刷新数据网格视图时出现问题
我在显示数据网格视图控件中的所有记录时遇到了很多麻烦。我正在使用未绑定的数据来填充我的网格,因为没有太多记录可以显示,并且我需要只读该数据。我的问题是,当我以编程方式填充网格时,并非所有行都会显示,并且仅当我尝试调整标题列宽度时才会显示它们。我尝试了不同的方法,如刷新、无效等,以使网格显示所有记录,但没有任何效果!我真的很感激任何关于为什么会发生这种情况以及如何解决它的见解!
谢谢
I've been having a lot of trouble displaying all the records I have in a Data Grid View Control. I'm using unbound data to populate my grid since there are not many records to display and I need that data to be read only. My issue is that when I populate my grid programatically, not all rows are displayed and they're only displayed when I try resizing the header column width. I tried different things like Refresh, Invalidate, etc to make the grid display all records but nothing worked! I would really appreciate any insight on why this happens and how to solve it!
Thanks
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您可以尝试用其他控件显示您的记录
看看我对这个问题的回答
Gridview with Expandable Rows for winforms
你可以发布吗一些代码可以重现问题?
此致
you can try to display your records with other controls
look at my answer for this question
Gridview with expandible rows for winforms
can you post some code to reproduce teh problem?
best regards