Winforms / .Net 3.5
I am using a combobox with the dropdownstyle set to dropdown (allows users to enter data).
The problem I am having is with how to setup the combobox so it updates my bindingsource with values from the list and also when a user enters data.
For example the combobox may contain the following values:
"Red", "White", "Blue". But the user should be able to enter "Black".
I tried using the "Text" property but the problem is my combobox display values include extra information (code and a description) than the Value (only code).
I tried using SelectedValue when adding bindings to the combobox, but then it only updates with values from the list and not when a user enters data.
MyComboBox.DataBindings.Add("SelectedValue", MyBindingSource, "MyProperty", True, DataSourceUpdateMode.OnValidation)
Any ideas?