DropDown list binding to a datarow

M

Maziar Aflatoun

Hi,

I have a DataRow that I want to bind to a dropdown list. I have 2 columns
(TypeName, TypeValue). When do

ddlNewAttribute.DataSource = drAttrValues;
ddlNewAttribute.DataBind();

How do I go about binding to a specific column (TypeValue)?

Right now I'm getting [System.Data.DataRow] for the values.

Thanks
Maz.
 
G

Guest

Try:

ddlNewAttribute.DisplayMember = "TypeName";
ddlNewAttribute.ValueMember = "ValueName";

Brendan
 

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

Top