How to suspend a DataGridView while updating its columns

前端 未结 6 1652
无人及你
无人及你 2020-12-09 11:19

How can I suspend a .NET DataGridView from displaying anything while I update its Columns?

Here\'s my current code. It works ok, but it is very slow on the foreach

6条回答
  •  离开以前
    2020-12-09 11:52

    You can use VirtualMode with DataGridView in order to very efficiently update the grid. See this article: http://msdn.microsoft.com/en-us/library/ms171622.aspx

    From what I remember, it seems to update the entire collection before updating anything on the UI, as opposed to adding to the UI for each new row added/etc.

提交回复
热议问题