I active coloum I use an dropdownlist box in edit mode.I want to bind that
dropdownlist to database coloum in edit mode.
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.
Bharat BhushanPosted Feb 3, 2011, 2:33 AM
http://www.codegain.com/articles/aspnet/listcontrols/how-to-bind-dropdownlist-inside-gridview-in-aspnet.aspx
Thanx
vijayPosted Feb 3, 2011, 2:20 AM
try this steps you have TO add this code into grid view row command properties..add dropdownlist command name IN CLIENT SIDE..
if e. commandname="Given id in client side " then
write the update sql command by selecting the field dropdown,after get the data from database load into particular field..
check the link it may useful... GRID VIEW OR CLICK HERE
George OnofreiPosted Feb 3, 2011, 12:08 AM
Krishna GaradPosted Feb 2, 2011, 11:28 PM
Ketul RathodPosted Feb 2, 2011, 11:21 PM
Krishna GaradPosted Feb 2, 2011, 10:58 PM
Foreach(gridviewrow row in Gridview1.Rows)
{
DropDownList ddl=(DropDownList)row.FindControl("ddl");
//Bind ddl here;
}