Set SelectedIndex on Dynamically Generated DropDownList
Posted on 2004-10-05
I've got a very large datagrid, filled with client data to be edited, populated from tblClient.
In this grid, I've got 6 dropdownlists populated with selections from separate tables. How do I get the selected index of each dropdownlist to equal the value entered in the tblclient??
I tried "selecedIndex='<%#Container.DataItem("FieldName")%> but that just gave me the second or third in the list, not the actual match.
Is that at all clear??
Thanks to all for your help!