SelectionChangeCommitted

How to Detect ComboBox Selected Value in DataGridView

Detecting the selected value of ComboBox is done by using the event like SelectedIndexChanged, SelectedValueChanged, and SelectionChangeCommitted. This event is being fired once you select a value in a ComboBox. However, if you have a ComboBox column in DataGridView control, you cannot easily use those events without adding a Handler.

Stop SelectedIndexChanged from Firing on Form Load Event

If you are using SelectedIndexChanged in your ComboBox may be you encounter a problem with events being fired even if you did not click the ComboBox.

This happens when you open and close your Windows Form. The workaround for this is to use RemoveHandler statement.

Here’s an example: RemoveHandler CreditTermIDComboBox.SelectedIndexChanged, AddressOf CreditTermIDComboBox_SelectedIndexChanged

And when you’re done executing the Form Load event you have to add back the handler again by using the AddHandler statement.

Here’s an example: