How to prevent drawing DataGrid rows while adding rows?

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi,

I have a DataGrid with a DataTable as data source. At some point I fill the
DataGrid with rows, but I notice that for every row I add the DataGrid is
forced to repaint its contents.

How can I stop DataGrid from updating itself while I'm putting in a lot of
rows?

Thank you,
 
Try using SupendLayout and ResumeLayout, these functions avoid rendering.
(Remember to call ResumeLayout otherwise the control won't paint anymore)

cheers
Salva
 
Salvador,

Thanks, that did the trick :)

TT

Salvador said:
Try using SupendLayout and ResumeLayout, these functions avoid rendering.
(Remember to call ResumeLayout otherwise the control won't paint anymore)

cheers
Salva
 
Back
Top