2
Answers

Trapping ComboBox changes...

Dave Wilcox

Dave Wilcox

8y
258
1

On a comboBox change, I am trying to capture the old value and compare to the new value. If the user accidentally clicks the dropdown and simply selects the same value (thinking they are not changing anything) it will still trigger a change event and drive some code. If the user choose the same value, I want to trap for that and STOP the normal course of events.

I have tried SelectedValueChanged, SelectedIndexChanged, and Validating. Validating seems to only apply when the form closes.

Theoretically, I want to capture "TextOld" and compare to "TextNew" and see if they are the same. If they are then STOP.

Answers (2)