How to suspend a DataGridView while updating its columns

前端 未结 6 1682
无人及你
无人及你 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:25

    In my case suspend and resume layout did not work. I resolved disabling the dataGridView (dgv.Enabled = false) before update and re-enabling it (dgv.Enabled = true) at the end of the update process.

提交回复
热议问题