List<user> lstusers = new List<user>(); objDetails = new Details(); lstusers = objDetails.getAllUsers(); grdUserList.DataSource = lstusers; grdUserList.DataBind(); foreach (GridViewRow row in grdUserList.Rows) { if (row.RowType == DataControlRowType.DataRow) { CheckBox chk = new CheckBox(); chk = (CheckBox)row.FindControl("chkIsEnbled"); for (int i = 0; i < lstusers.Count; i++) { if (lstusers[i].isEnable == "1") //if (row.Cells[5].Text == "1") { chk.Checked = true; } else { chk.Checked = false; } } } }</user></user>
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)