Hi,
I have a grid with three columns. Now I need to bind the first column as a dropdown list and then rest like simple procedure. I just need some suggestions on binding the first column with dropdown list.
Loading
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Prashant SrivastavaPosted Oct 1, 2013, 11:34 AM
You can bind the dropdown list using below mentioned steps :
1. Place a dropdown list control in "EditItemTemplate" of GridView.
2. On Row DataBound use "e.Row.FindControl" to find particular control of datagrid i.e. dropdownlist.
3. Now after finding the control just put the dataset / datatable whatever you have in the Datasource of Dropdown list.
For reference you can use below mentioned url :
URL:
http://www.aspsnippets.com/Articles/Populate-DropDownList-with-Selected-Value-in-EditItemTemplate-of-GridView-in-ASPNet.aspx
Regards,
Prashant Srivastava