Help accessing other columns from DataSource table in a drop down combo box?

  • Thread starter Thread starter Alex
  • Start date Start date
A

Alex

Hi all,

I'm trying to get this example working with csharp in a winforms app...
I'm creating a datasource and putting in a table that has 10 columns:

cboxTeam.DataSource = cboxTeam_DS.Tables["MyTable"];
cboxTeam.DisplayMember = "MyCol2";
cboxTeam.ValueMember = "MyCol1";

In the _SelectedIndexChanged, how do I get the values of MyTable.MyCol3 for
the currently selected row in the combobox? Or even the whole row for
MyTable?

Do I have to databind it and use a currencymanager? Since I'm mapping the
whole table to the cbox, it seems like I should be able to access the other
members from there...???

Thanks!
 
Back
Top