foreach(GridViewRow gvrow in gvDetails.Rows) // iterate all the rows { CheckBox chk = (CheckBox)gvrow.FindControl("chkSelect"); // find the checkbox control in that row if (chk != null & chk.Checked) // check if checkbox if checked { string Id = gvDetails.DataKeys[gvrow.RowIndex].Value.ToString() + ','; // get the Id or any value using checked row in grid // fire delete query here based on Id } }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)