删除gridview里的一行或者多行内容:
//删除
private void btnDelete_Click(object sender, EventArgs e)
{
DataGridViewSelectedRowCollection rows = this.dataGridView1.SelectedRows;
foreach (DataGridViewRow row in rows)
this.dataGridView1.Rows.Remove(row);
}
进入页面:
选中要删除的行:
如图: