I would like to delete the first row of the DataGridView
before adding any rows through the program.
Instead of deleting through the program, I would rather remove the first row from the DataGridView
properties.
Any Idea how to do it ?
Thanks
You appear to be referring to the default new row on an editable DataGridView
which allows users to add a new row to the grid using the UI.
To stop this row from appearing you simply set the DataGridView.AllowUserToAddRows
property to false, either programatically or in the designer.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.