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

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
 
S

Stephen Muecke

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top