如何禁用 DatagridView 中的最后一个空行? [英] How to disable the last blank line in DatagridView?
本文介绍了如何禁用 DatagridView 中的最后一个空行?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
对于 C# Window Form,有一个名为 DataGridView 的工具.
For C# Window Form, there is a tool called DataGridView.
如果我们用它来显示数据,它会显示额外的一行.
If we use that to display data, it shows an extra line.
如果我们有 3 行数据,它显示 4 行.第四行是空行.
If we have 3 rows of data, it shows 4 rows. the 4th row is a blank row.
我想知道如何禁用它...或隐藏它?
I wanna know how to disable it.. or hide it?
推荐答案
这样做:
myDataGridView1.AllowUserToAddRows = false
这篇关于如何禁用 DatagridView 中的最后一个空行?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文