ComboBox and updating data
I have a ComboBox that is data bound to a particular Dataset's table and column. When the DropDownStyle is DropDownList, a user's changes to the field are not recognized.
Changing the DropDownStyle to DropDown - things work just fine - either by selecting from the list or manually typing.
The latter is not an option, as I need to restrict the possible values. What am I missing here? Any ideas are appreciated.
Mike
Re: ComboBox and updating data
I had quite similar problem with DropDownList . I was trying to get the selected item by the user like this :
MsgBox(ComboBox4.SelectedItem()) and always throw an exception but when I changed the dropping style to :DropDown it works . at the end I used this :
MsgBox(ComboBox4.Text) along with DropDownList property and worked fine . I dunno if this would give you any clue or not !
Re: ComboBox and updating data
I experienced a similar error - when I add an item to the combobox's datasource, the display in the collection turns to "AssemblyName.ClassName". Here's how I overcame the bug:
cmbStudyTracks.DataSource = Nothing
cmbStudyTracks.DataSource = _studyTracks
cmbStudyTracks.DisplayMember = "Name"
cmbStudyTracks.ValueMember = "ID"
Works fine now.