for each (DataGridViewRow^ Tw in myDataGrid1->Rows){ if(Tw->Selected==true){ //DJDtb->Rows[myDataGrid1->CurrentRow->Index]->Delete(); myDataGrid1->Rows->Remove(Tw); } }
private void buttonRemove_Click(object sender, EventArgs e) { foreach (DataGridViewCell oneCell in dataGridView1.SelectedCells) { if (oneCell.Selected) dataGridView1.Rows.RemoveAt(oneCell.RowIndex); } }
foreach (DataGridViewRow row in DataGridView1.SelectedRows) { DataGridView1.Rows.Remove(row); }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)