jack Chen jack Chen - 2 years ago 63
C# Question

Colums.AddRange is to slow

This code takes 15 sec to execute:

this.gridView1.Columns.AddRange(Coloms.ToArray());//the number of Coloms is big


What can I do to speed it up?

Answer Source

Try disabling visual updates.

this.gridControl1.BeginUpdate();
this.gridView1.Columns.AddRange(Coloms.ToArray())
this.gridControl1.EndUpdate();    
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download