DropDownList and DataColumn comparison

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • E11esar
    New Member
    • Nov 2008
    • 132

    DropDownList and DataColumn comparison

    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.

    e.g.

    dropDownList.Se lectedItem.Valu e = thisRow["column_val ue"];

    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)
  • nukefusion
    Recognized Expert New Member
    • Mar 2008
    • 221

    #2
    Isn't there a SelectedValue property that you can set?

    Comment

    Working...