阅读背景:

在WinForms中更新控件时闪烁(例如DataGridView)

来源:互联网 

In my application I have a DataGridView control that displays data for the selected object. When I select a different object (in a combobox above), I need to update the grid. Unfortunately different objects have completely different data, even different columns, so I need to clear all the existing data and columns, create new columns and add all the rows. When this is done, the whole control flickers horribly and it takes ages. Is there a generic way to get the control in an update state so it doesn't repaint itself, and then repaint it after I finish all the updates? In my application I have a DataGridView control




你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: