When I fill a DataGridView with data, there is always an empty row at the bottom.
How do I disable this?
C# – How to remove the empty row from the bottom of a DataGridView control
cdatagridviewnetwinforms
Related Topic
- C# – Deep cloning objects
- C# – What are the correct version numbers for C#
- .net – the best algorithm for overriding GetHashCode
- C# – Case insensitive ‘Contains(string)’
- C# – How to update the GUI from another thread
- C# – Try-catch speeding up the code
- Scala: list.flatten: no implicit argument matching parameter type (Any) = > Iterable[Any] was found
Best Answer
Yes, there will always be an empty row at the bottom of a
DataGridView
. It allows the user to add new data at run-time; all they have to do is start typing in the new row.To disable it, you will also need to prevent the user from adding new rows. Do this by setting the
AllowUserToAddRows
property of yourDataGridView
control to False: