Posted on: 12/19/2014 1:07:52 PM | Views : 454

Hi,
I am implementing the bulk delete functionality with the help of Checkbox.
I implemented the below code:-
protected void btnDelete_Click(object sender, EventArgs e) { foreach (GridViewRow gvRow in grdUser.Rows) { CheckBox chkDelete = (CheckBox)grdUser.FindControl("chkDelete"); if (chkDelete.Checked) { string Id = grdUser.DataKeys[gvRow.RowIndex].Value.ToString(); DeleteRecordByID(Id); } } } public void DeleteRecordByID(string Id) { SqlConnection conn = new SqlConnection(System.Configuration.ConfigurationManager.ConnectionStrings["DefaultCSRConnection"].ConnectionString); SqlDataAdapter da = new SqlDataAdapter("DeleteRecordForUserInBulk", conn); da.SelectCommand.CommandTyp ...

Go to the complete details ...