foreach (GridViewRow gr in gridView1.Rows) { string errType = gridView1.DataKeys[rowIndex].Values["Err"].ToString() if (errType != null && errType != "") { CheckBox cb = (CheckBox)gr.Cells[0].FindControl("chkError"); cb.Enabled = true; cb.Checked = true; } else { CheckBox cb = (CheckBox)gr.Cells[0].FindControl("chkError"); cb.Enabled = false; } }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)