开发者

Stop DataGridView from autoadding a new row

开发者 https://www.devze.com 2023-03-03 15:00 出处:网络
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 data

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.

0

精彩评论

暂无评论...
验证码 换一张
取 消