//dataGridView 删除选中行
int num = dataGridView2.SelectedRows.Count;
while (num > )
{
DataGridViewRow r = dataGridView2.SelectedRows[];
r.Selected = false;
dataGridView2.Rows.Remove(r);
num--;
}
dataGridView2.Update();
2024-02-03 18:45:58
//dataGridView 删除选中行
int num = dataGridView2.SelectedRows.Count;
while (num > )
{
DataGridViewRow r = dataGridView2.SelectedRows[];
r.Selected = false;
dataGridView2.Rows.Remove(r);
num--;
}
dataGridView2.Update();
下一篇:运行第一个Python程序