how to implement a DataGridViewComboBox's SelectedValueChanged event?

Is there any way to implement a DataGridViewComBoBox SelectedValueChanged event really need it




Answer this question

how to implement a DataGridViewComboBox's SelectedValueChanged event?

  • James Wilkinson

    Thanks Regis. How to unhook the event handler in the DataGridView.CellEndEdit

  • Bone

    Hi Ronin,
    You should listen to the DataGridView.EditingControlShowing event. It exposes the ComboBox control used for editing (in e.Control). In that event handler you can start to listen to the SelectedIndexChanged or SelectedValueChanged event of the ComboBox. You can unhook the event handler in the DataGridView.CellEndEdit event.

    Thanks,
    -regis
    Microsoft DataGridView Developer
    This post is provided "as-is"

  • nguyen_van

    For C#, use += and -= to hook and unhook your event handers.  For VB, instead of using a handler with "Handles", use AddHandler and RemoveHandler.
       -Scott


  • how to implement a DataGridViewComboBox's SelectedValueChanged event?