When I want to delete empty lines automatically inserted in c # data grid view, the program falls into the error and the unsaved line gives the warning that it can not be deleted.
dataGrid.AllowUserToAddRows = false`
I can not enter data when I apply the code.
the System.InvalidOperationException`
HRESULT = 0x80131509
Message = New unsaved line can not be deleted.
Source = system.windows.forms
User contributions licensed under CC BY-SA 3.0