关于删除 dataGridView控件选中的行
从网上找到删除 dataGridView控件选中行的语句,如下:
foreach (dataGridViewRow r in dataGridView1.SelectedRows)
{
if (!r.IsNewRow)
{
dataGridView1.Rows.Remove(r);
}
}
编译后出现了错误: CS0246 未能找到类型或命名空间名“dataGridViewRow”(是否缺少 using 指令或程序集引用?) WindowsFormsApp1 D:\XML\数据表序列化\WindowsFormsApp1\WindowsFormsApp1\Form1.cs 74 活动的
请赐教。