Stop DataGridView from autoadding a new row
Hey guys, sorry for this probably fairly simple question but I'm starting to get crazy about this^^ Point is I show a little data to the user via an DataGridView, it开发者_Go百科s not bound to a datasource but added directly. Now so far everything works fine but the dgv always automatically adds a new, empty line after the ones I added. I've tried removing it by rows.remove(), etc but I just got errors...
Maybe one of you knows the answer?
Thanks for any help in advance!!!
Greets,
Lorenz
Set the DataGridView.AllowUserToAddRows property value to false to hide the new row. Set it back to true
to show the new row again.
精彩评论