DataGridView in Virtual Mode flickers when adding rows.
Posted on 2010-08-26
I'm fighting against a .NET 2.0 DataGridView in Virtual Mode. I'm handling its CellValueNeeded event providing data it has to show. Everything is working fine, but there is an anoying thing... When I periodically add additional rows to the DataGridView (by calling its Rows.Add() method) the entire view flickers and the cpu load rises about 10%. It flickers even if the view does not show any freshly added data!
In my oppinion DataGridView's internal row collection is changed when a row is added to the collection which results in the entire view to repaint.
Can anyone tell me how I can eliminate repainting the view in this case?
Thank you in advance!