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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top