protected void taskgrid_RowEditing(object sender, GridViewEditEventArgs e)
{
Load_Projectlist();
taskgrid.EditIndex = e.NewEditIndex;
BindTaskList();
DropDownList ddl = taskgrid.Rows[e.NewEditIndex].FindControl("ddlnewproject") as DropDownList;
if(ddl != null)
{
DataTable dtpl = UserTaskProgress.Get_ProjectList(UDFLib.ConvertToInteger(Session["USERID"]));
ddl .DataSource = dtpl;
ddl .DataBind();
ddl .Items.Insert(0,new ListItem("-Select-","0"));
}
}
else
{
}
hope this will help