for (int intCount = 0; intCount < gvCustomer.Rows.Count; intCount++) { bool chkischeck=false; string strcheck = ""; ch1 = (DataGridViewCheckBoxCell)gvCustomer.Rows[intCount].Cells[1]; if (ch1.Selected) { intGridID =Convert.ToInt32(gvCustomer.Rows[intCount].Cells[0].Value); m_Id = intGridID; DeleteData(); } }
Quote:how to check checkbox is selected or not datagrid
foreach (GridViewRow row in GridView1.Rows) { // Use find control to get the check boxes in grid. CheckBox checkbox = (CheckBox)row.FindControl("cbRows"); //Check if the checkbox is checked. if (checkbox.Checked) { // you will come to know here the check box is selected or not. } }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)