Software Development Network>> Visual Basic>> Fill a combox with DataReader
just an alternative, if you are using a DataTable to fill your data with, why not set the DataSource and displaymember properties
Me.theComboBox.DataSource = theDataTable.DefaultView
Me.theComboBox.DisplayMember = "FieldNameToBindTo"
Fill a combox with DataReader
tigerlil
just an alternative, if you are using a DataTable to fill your data with, why not set the DataSource and displaymember properties
Me.theComboBox.DataSource = theDataTable.DefaultView
Me.theComboBox.DisplayMember = "FieldNameToBindTo"
WinFXGuy
Rimey57
try this:
While DataReader.Read
ComboBox1.items.add(DataReader.GetValue(x).ToString)
End While
Dave
david999