如果说只能删除第一行
那你的this.bookDataGridView.CurrentRow.Index就肯定一直是0了,看看程序哪里出了问题。有两个属性,好象是bookDataGridView.SelectionMode=FullRowSelect;
bookDataGridView.MultiSelect=True;for(int i=bookDataGridView.SelectedRows.Count-1;i>=0;i--)
{
ds.Tables[0].Rows.RemoveAt(bookDataGridView.SelectedRows[i].Index);
}
那你的this.bookDataGridView.CurrentRow.Index就肯定一直是0了,看看程序哪里出了问题。有两个属性,好象是bookDataGridView.SelectionMode=FullRowSelect;
bookDataGridView.MultiSelect=True;for(int i=bookDataGridView.SelectedRows.Count-1;i>=0;i--)
{
ds.Tables[0].Rows.RemoveAt(bookDataGridView.SelectedRows[i].Index);
}
然后添加选中时间至于删除选中列
最好处理一下选中时间
比如说RowEnter时间等等ds.Tables[0].Rows[this.bookDataGridView.CurrentRow.Index].Delete()
有点诡异啊,ds看起来是数据源,
bookDataGridView看起来是DataGridView
不知道你要做什么