Binding two columns to a DropDownList

  • Thread starter Thread starter Simon Harvey
  • Start date Start date
S

Simon Harvey

Hi all,

I have two columns in a databse that I wish to bind to a dropdownlist, one
column as the value (or index) the other as the text value displayed.

Does anyone know how I can achieve this?

Thank you

Simon
 
Just look at the properties window in the designer, you'll see that this
capability is built in. You can set the DataSource (a dataset, for example)
the DataMember (a datatable) the DataTextField, and the DataValueField.
 
Back
Top