datagridview not allowing user to delete row
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.
Another reason why hitting Delete doesn't remove the rows is if you have the RowHeadersVisible
property set to False, thus not showing the *
in the left most column. With that fixed, @MAW74656's solution worked for me.