Victor,
I am not very sure if I got your question correctly. Did you mean to ask: "How can I populate the elements a DropDownList from one table (Table1) and be able to set/get the displayed element from another table (Table2)?"
To do this,
1) Set the DisplayMember of the combobox to the appropriate field from Table1.
2) Set the ValueMember to the appropriate field from Table1
3) Set the SelectedValueMember to the appropriate field from Table2.
NOTE: Make sure that SelectedValue is contained in the Values, to avoid any runtime surprises! That is, if Names is Table1 and ValueMember column in Names.nameID and if Grades is Table2, I would use Grades.nameID as the SelectedValueMember
HTH
Sreeram
|