C#-Forms-的DataGridView,挂起 [英] C#-Forms-DataGridView-Hangs

查看:83
本文介绍了C#-Forms-的DataGridView,挂起的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Hello


我在C#中创建了一个Form并在那里使用DataGridView。随着行在DataGridView中不断更新,它最初可以正常工作。但是,当我必须向下滚动以查看添加的行时,软件会冻结。行添加了,但我看不到
。我只能看到最初在窗口中显示的行(不使用滚动)。 


问题出在哪里?是滚动吗?


任何帮助都将不胜感激。


谢谢


Deepak

解决方案

在关于冻结:加载一个标准的DataGridView 5000个记录说,也许5列将是非常敏感的,但是让我们假设你加载相同量包含格式化单元格在内的各种事件的数据,如果操作不正确,这可能很容易造成问题。另一个问题可能是滚动您从数据源获取数据或进行更新或计算等。


关于添加但未显示的行,没有足够的细节,例如尽可能详细地向我们描述如何加载DataGridView,解释它就像你正在与非开发人员交谈。


简而言之,你没有提供重要的细节来确定手头的问题。


Hello

I have created a Form in C# and use DataGridView out there. As rows keep getting updated in the DataGridView, it works ok initially. However when I have to scroll down to see the rows added, the software freezes. The rows do get added, but I can't see them. I can only see the rows which get displayed initially in the window (without using scroll). 

Where is the problem? Is it with the scroll?

Any help would be appreciated.

Thanks

Deepak

解决方案

In regards to freezing: A standard DataGridView loaded say with 5,000 records, perhaps 5 columns will be very responsive but let's say you load the same amount of data with various events including formatting cells, when done incorrectly this could easily be an issue. Another issue might be as scrolling you are getting data from a data source and or doing updates or calculations etc.

In regards to rows added but not shown, not enough details e.g. with as detailed as possible describe to us how the DataGridView is being loaded, explain it like you are talking to a non-developer.

In short you have not provided significant details to really pin point the issues at hand.


这篇关于C#-Forms-的DataGridView,挂起的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆