protected void MyGridView_OnRowDataBound(object sender, GridViewRowEventArgs e)
{ if (e.Row.RowType == DataControlRowType.DataRow)
{
DropDownList ddlMyList = (DropDownList)e.Row.FindControl("ddlMyList");
// Do some logic to populate my ddlMyList with data
ddlMyList.SelectedValue = DataBinder.Eval(e.Row.DataItem, "ID").ToString();
}
// Do some logic to populate my ddlMyList with data
ddlMyList.SelectedValue = DataBinder.Eval(e.Row.DataItem, "ID").ToString();
}
}
This comment has been removed by the author.
ReplyDeleteHow it will be if there is some explanation of your thoughts. :)
ReplyDelete