How to remove the last/footer-row in DataGridView?
c#, datagridview, datatable, winforms
Solution
That is not data table row but so called `NewRow` of `DataGridView` to remove it set property `AllowUserToAddRows` (MSDN) to `false` for your gird.
You may either set it from code or using visual studio designer.
Problem
I have a datatable which I use it as a datasource for my datagridview: ``` dgv.DataSource = dt; ``` but after binding the datatable I get the below result. The last row allows people to click on the row and enter data which I don't want to happen. How can I remove the last row in run time (highlighted in the picture) Thanks