Wednesday, April 6, 2011

Populate Dropdown lists in GridView in asp.net-II

other than doing in the previous post, we can do it in the following way





protected void GridView1_RowDataBound(object sender,GridViewRowEventArgs e)
{
DropDownList ddl = new DropDownList();
ddl = (DropDownList)e.Row.Cells[Cell No].FindControl("Template DropDownId");
//Code to bind the dropdownlist...
}

No comments:

Post a Comment