hi, I just test this code and it prints like this
unchecked
checked
unchecked
checked
unchecked
checked
protected void btn1_Click(object sender, EventArgs e)
{
int i;
for (i = 0; i < GridView1.Rows.Count; i++)
{
CheckBox cb = (CheckBox)GridView1.Rows[i].Cells[0].FindControl("CheckBox1");
if (cb.Checked)
{
Response.Write("checked<br>");
}
else
{
Response.Write("unchecked<br>");
}
}
}</br></br>
there are 6 records loaded in the gridview and I checked its alternative rows. hence whenever it prints checked it should delete the record. rebind the gridview after the delete operation to see it result.