By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
435,640 Members | 2,355 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 435,640 IT Pros & Developers. It's quick & easy.

DropDownList and DataColumn comparison

P: 132
Hi there.

I am looking to set a DropDownList value dependant on what a column value is for a corresponding DataTable, but I don't know how to set the equality here.


dropDownList.SelectedItem.Value = thisRow["column_value"];

Currently the column_value is an integer value between 1 and 6 and it corresponds with the six possible choices in the DropDownList. So how do I accomplish this please?

I am finding it (obviously) simple to assign column_values from the DataTable to the likes of TextBoxes and Labels but the DropDownList has me a bit stumped.

Thank you.

M :o)
Feb 24 '09 #1
Share this Question
Share on Google+
1 Reply

Expert 100+
P: 221
Isn't there a SelectedValue property that you can set?
Feb 26 '09 #2

Post your reply

Sign in to post your reply or Sign up for a free account.