I learned something new today: when handling a user-initiated event from a combo box (when a user selects an item), most of the time you want to handle the
SelectionChangeCommitted event, not the
SelectedIndexChanged or
SelectedValueChanged events - the latter two events may also fire when the combo box is changed through code. From MSDN:
SelectionChangeCommitted is raised only when the user changes the combo box selection. Do not use SelectedIndexChanged or SelectedValueChanged to capture user changes, because those events are also raised when the selection changes programmatically.
The event order is [
ChangeCommitted] >> [
ValueChanged] >> [
IndexChanged]