这个没有数据的空行有时候让软件设计觉得很麻烦,dataGridView.Rows.Count为1,明明没有数据却有一行空白。

原因:是默认的用户输入提示行,dataGridView默认始终等待一行的输入。

解决办法:把这个默认属性改掉就没有默认空行了,dataGirdView.Rows.Count为0。见下图。

如何让dataGridView初始状态没有空行

 

相关文章:

  • 2021-06-12
  • 2022-12-23
  • 2021-10-19
  • 2022-12-23
  • 2021-05-21
  • 2021-10-24
  • 2022-12-23
  • 2021-07-16
猜你喜欢
  • 2022-01-12
  • 2021-10-07
  • 2021-11-22
  • 2021-12-20
  • 2021-04-01
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案