DataGridView - how to hide the "new" row?
On the form designer view, click the little arrow to the right on the DataGridView. Adjust the value for Enable Adding
. That will remove the row at the bottom of your grid.
Programmatically, you can adjust the AllowUserToAddRows
property.
myGrid.AllowUserToAddRows = False
Just a clarification for other people who are looking at this for WPF the datagrid property has been renamed to CanUserAddRows
The DataGridView
has a boolean property AllowUserToAddRows
. Set this to false and you should no longer see the empty row at the end of the grid.