Problem with dropdown in gridview
1 answer
You can edit the columns in the GridView and set these two TemplateColumns and then put a DropDownList named DropDownList1 in the TemplateColumn. Then, as Hunter says, using the DataBound event to bind to the dataset like so:
DropDownList list = e.Item.FindControl("DropDownList1");
list.DataSource = < your DataSet here>;
list.DataValueField = "code";
list.DataTextField = "description";
list.DataBind();
0
a source to share