private void BtnDcDelete_Click(object sender, EventArgs e) { do { foreach (DataGridViewRow row in dataGridViewEx1.Rows) { try { dataGridViewEx1.Rows.Remove(row); } catch (Exception) { } } } while (dataGridViewEx1.Rows.Count > 1); }
foreach (DataGridViewRow row in myDataGridView.SelectedRows) { myDataGridView.Rows.Remove(row); }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)