//Loop through all the rows in gridview foreach(GridViewRow gvrow in gvUserDetails.Rows) { //Finiding checkbox control in gridview for particular row CheckBox chkdelete = (CheckBox)gvrow.FindControl("chkdelete"); //Condition to check checkbox selected or not if(chkdelete.Checked) { //Getting UserId of particular row using datakey value int usrid = Convert.ToInt32(gvUserDetails.DataKeys[gvrow.RowIndex].Value); //Delete logic by using above key value. } }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)