且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

datagridview 不允许用户删除行

更新时间:2023-02-04 22:01:06

我创建了一个空的 winform 并将网格代码放入其中.不同之处在于我如何设置 DataGridView.EditMode.我有它 = EditOnEnter,但如果我设置它 = EditOnKeystroke.

I created an empty winform and just put the grid code into it. The difference was how I had the DataGridView.EditMode set. I had it = EditOnEnter, but the delete works perfectly if I set it = EditOnKeystroke.