I have nested Gridview and the last Gridview has Checkbox.
the condition in checking the Checkbox whether it is checked or unchecked
foreach (GridViewRow gvr in GridView1.Rows)
{
GridView GridView2= gvr.FindControl("GridView2") as GridView;
foreach (GridViewRow gvr2 in GridView2.Rows)
{
GridView GridView3= gvr2.FindControl("GridView3") as GridView;
foreach (GridViewRow gvr3 in GridView3.Rows)
{
if(((CheckBox)gvr3.FindControl("chk1")).Checked)
{
string txt = txtKeyboard.text;
}
}
}
}
even though it is unchecked it will go though the condition