vendredi 27 février 2015

SelectedIndexChanged event fires when the displaymember value is changed

My listbox control is Firing the SelectedIndexChange event when only the bound field DisplayMember is changed. I would expect the SelectedItem Changed event to fire, but this thing is firing the IndexChanged , is it "rebinding" because the bound field is changing and therefore causing the Index to be reset ?


DisplayMember = "MyField"; ValueMember = "MyID"; Datasource = MyBindingSource;


The selectedIndexEvent does fire when the selection changes too, it just should not fire when the DisplayMember changes.


Aucun commentaire:

Enregistrer un commentaire