Binding combo box to datatable

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I've bound a combo box to a datatable in a dataset. I can't figure out how
to access the selected row directly. If possible, I'd like to cast it into
strongly typed datarow from my dataset:
myRow=(myDataset.MyDataTable.MyRow)cboList.Items[.selecteditem];
 
You can use the Strongly types rows collection and use the index of the
combobox to specify the table index (provided they are sorted the same) and
you know the column index because that's what you're binding to.
 
Back
Top