First, let me thank everyone for the help I have gotten recently. I am doing alot more programming stuff and I am delving into areas where I previously didn't have to go .. but it is a living.
Background:
I have a textbox that is bound to a datasource
tbArtist.DataBindings.Add(New Binding("text", bindClients, "Artist"))
However, since there may be any number of items that can be placed in this textbox, I would like to make it a combo box and keep the data entered as data to use for filling the combobox with the default values to select from.
What I have tried:
cbArtist.DataBindings.Add(New Binding("text", bindClients, "Artist"))
Try
Dim ds As DataSet = GetMyData("Artists", "ID")
With cbArtist
.DataSource = ds.Tables("Artists")
.DisplayMember = "Atrist"
.SelectedIndex = 0
End With
Catch ex As Exception
MsgBox("Cannot load Artist list", MsgBoxStyle.Information)
End Try
So I have tried the above, and I can set the datasource for the combobox data, and the text value remains bound to the dataset, but now, if the user enters something not in the combobox, I'd like to add it back to the "Artists" table (i.e. the DataSource for the combobox) so the next time the user selects the combobox, it will be in the list.
Is there a way to do this automatically or do I have to code the whole thing by creating a dataset and updating it manually.