Bound lists and such.... ??? Help...

  • Thread starter Thread starter anthonyn
  • Start date Start date
A

anthonyn

For example: Say I have two tables... One where I want to write to, the
other where I want my possible values to come from...

Such as a combo box bound to a table that has my values, when the user
selects the item, rather then copy the text value to a field bound to my
destination table, can't I do it all with the one combo box? Basically the
control would both provide the user with a list of values and write the
chosen one to the db...

Thanks in advance...

Anthony Nystrom
 
Anthonyn

Set the ComboBox.DataSource to one DataTable and bind the SelectedItem to a
column of the other DataTable

myCombo.DataSource = firstTable
myCombo.DataBindings.Add("SelectedItem", secondTable, "ColumnName")

Stephen
 
Back
Top