【问题标题】:BeginUpdate / EndUpdate for DataGridView requestDataGridView 请求的 BeginUpdate / EndUpdate
【发布时间】:2011-04-28 11:09:13
【问题描述】:

在处理字段更新时,我需要冻结(停止重绘)DataGridView。

是否有类似 BeginUpdate 的东西来临时冻结 DataGridView

【问题讨论】:

    标签: .net winforms datagridview


    【解决方案1】:

    最好的办法是使用 Adam Robinson 的回答 here 中的扩展方法。

    将它们与您的 DataGridView 一起使用,如下所示:

    yourDataGridView.SuspendDrawing();
    
    // update your fields.
    
    yourDataGridView.ResumeDrawing();
    

    【讨论】:

      猜你喜欢
      • 2011-06-27
      • 1970-01-01
      • 2015-06-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2021-11-24
      • 2014-03-04
      • 1970-01-01
      相关资源
      最近更新 更多