Code
protected void CheckBox2_CheckedChanged(object sender, EventArgs e)
{
CheckBox cb = (CheckBox)sender;
foreach (GridViewRow gr in GridView1.Rows)
//for (int i = 0; i <= GridView1.Rows.Count - 1; i++)
{
CheckBox cbox = (CheckBox)gr.FindControl("CheckBox1");
// CheckBox cbox = (CheckBox)GridView1.Rows[i].FindControl("CheckBox1");
cbox.Checked =cb.Checked ;
}
}
protected void CheckBox2_CheckedChanged(object sender, EventArgs e)
{
CheckBox cb = (CheckBox)sender;
foreach (GridViewRow gr in GridView1.Rows)
//for (int i = 0; i <= GridView1.Rows.Count - 1; i++)
{
CheckBox cbox = (CheckBox)gr.FindControl("CheckBox1");
// CheckBox cbox = (CheckBox)GridView1.Rows[i].FindControl("CheckBox1");
cbox.Checked =cb.Checked ;
}
}