Datagrid with checkbox

Let's take a look at the datagrid. I have two textboxes, when I fill in the records and then I press the tab key badly, then another row is automatically generated so how can I delete multiple rows using a checkbox in the datagrid and not in the gridview

+2


source to share


1 answer


int i = (DataGridView1.Rows.Count - 1); while ((i> = 0)) {i = (i - 1); foreach (DataGridViewRow dr in DataGridView1.Rows) {if (dr.Cells ("check"). Value == false) {DataGridView1.Rows.Remove (dr); }}}



0


source







All Articles