protected void gv_All_RowDataBound(object sender, GridViewRowEventArgs e) { if (e.Row.RowType == DataControlRowType.DataRow && (e.Row.RowState & DataControlRowState.Edit) == DataControlRowState.Edit) { string strEnabled = Convert.ToString(Session["enabled"]); DropDownList ddlenabled = (DropDownList)e.Row.FindControl("ddlEnabled"); if (strEnabled!= "") { if (strEnabled== "Disabled") { ddlenabled.SelectedIndex=2; } else { ddlenabled.SelectedIndex = 1; } } else { ddlenabled.SelectedIndex = 0; } } }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)