Binding two columns to a DropDownList

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
 
R

Rick Spiewak

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

Members online

Forum statistics

Threads
473,768
Messages
2,569,575
Members
45,053
Latest member
billing-software

Latest Threads

Top