I have a combobox populated with numbers:
When I changed the selection via a MOUSE, the 'SelectedIndex', 'SelectedItem', and 'Text' were all correctly updated.
BUT, when I changed the selection via a KEYBOARD, only the 'Text' got updated. The other two remained unchanged. Therefore, when I left the TabPage (where this combobox is) and came back, the value was reverted. (Probably because the combobox was bound by its 'SelectedIndex')
Could someone tell me how to resolve it? It is fine with mouse though. Only when I used keyboard then I have this problem.
This combobox is bound to a Data Source.
The binding source is bound to an object.
cbColorCode.DataBindings.Add("SelectedIndex", bindingSource, "ColorCode", true, DataSourceUpdateMode.OnPropertyChanged, "-1");