//数据显示中选择删除的行,返回类型是 DataGridViewSelectedRowCollection
DataGridViewSelectedRowCollection selectRows = dataGridView1.SelectedRows;
//删除选择到的行
for (int i = 0; i < selectRows.Count; i++)
{
DataGridViewRow row = selectRows[i];
dataGridView1.Rows.Remove(row);
}