protected void btnDelete_Click(object sender, EventArgs e)
{
foreach (GridViewRow grow in GridView1.Rows)
{
CheckBox chkStat = grow.FindControl("chkStatus") as CheckBox;
int index = grow.RowIndex;
if (chkStat.Checked)
{
//Write some code if checkbox is checked
}
else
{
//Write some code if checkbox is not checked
}
}
}
{
foreach (GridViewRow grow in GridView1.Rows)
{
CheckBox chkStat = grow.FindControl("chkStatus") as CheckBox;
int index = grow.RowIndex;
if (chkStat.Checked)
{
//Write some code if checkbox is checked
}
else
{
//Write some code if checkbox is not checked
}
}
}
No comments:
Post a Comment