删除按钮事件:
private void ButtonDelete_Click(object sender, EventArgs e)
{
// MessageBox.Show("测试:"+ DGV_DriversList.SelectedRows.Count);
foreach(DataGridViewRow dr in DGV_DriversList.SelectedRows)
{
DGV_DriversList.Rows.Remove(dr);
ds.WriteXml("ReaderDriverInf.xml");//实现保存
}
MessageBox.Show("删除成功!");
}