protected void Button1_Click(object sender, EventArgs e)
{
foreach (GridViewRow grow in GridView1.Rows)
{
//Searching CheckBox("chkDel") in an individual row of Grid
CheckBox chkdel = (CheckBox)grow.FindControl(" ch");
//If CheckBox is checked than delete the record with particular empid
if (chkdel.Checked)
{
int id = Convert.ToInt32(grow.Cells[0]. Text);
DeleteRecord(id);
}
}
No comments:
Post a Comment