更改DataGridView.Enabled会挂起应用程序 [英] Changing DataGridView.Enabled hangs application

查看:77
本文介绍了更改DataGridView.Enabled会挂起应用程序的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在开发的桌面应用程序已经开始悬挂在完全可重复的情况下。当我在UI中禁用DataGridView时,总会发生挂起。 UI中有三个DataGridViews,但是这个问题(到目前为止)只在禁用其中一个时出现。


解决方案

进一步的研究(一个绝望的试错的好词)表明问题似乎在于滚动条。如果我在违规的DataGridView上将它们设置为ScrollBars.None,则应用程序将停止挂起。

结果

The desktop application I'm developing has started hanging under exactly repeatable circumstances.  The hang always occurs when I am disabling a DataGridView in the UI.  There are three DataGridViews in the UI, but this problem has (thus far) only appeared when disabling one of them.


解决方案

Further research (a nice word for desperate trial-and-error) indicates that the problem seems to lie with the scroll bars.  If I set them to ScrollBars.None on the offending DataGridView, the application stops hanging.



这篇关于更改DataGridView.Enabled会挂起应用程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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