I have a ComboBox
and in the form's load event it's populated with data. Now when I select an Item form the ComboBox
, it should perform some actions. So I know few events which can be used in this case like
SelectedIndexChanged
SelectedValueChanged
etc.
But the problem is those events are raised even when setting the DataSource
of the ComboBox and selecting a default index etc. when the form is loaded.
ComboBox1.DataSource = dt;
ComboBox1.SelectedIndex = -1;
What am I trying to do is that I just want to execute an action only when I select an item form the combo box. Is there a mouse event that could be used in this case?
SelectionChangeCommitted
...only fires on user click. – DonBoitnott