Thanks for your response. Regarding the second question, I am attaching a very simple example. I am not doing much there, just a virtual grid with 500 rows and 50 columns.
I am doing an invalidate every second. In the query cell info I am just setting some text, and every other row I am setting the backcolor as well. If you see the attached screenshot of performance monitor, the cpu usage is steady at around 60%.
Of course if I know exactly what cells to invalidate I can do an InvalidateRange.But I cannot do that since any part of the data may have changed. And the style settings like backcolor, etc also depend on the data in the real scenario.
My question is, is there anything I can do to optimize the Invalidate itself? Or do you think that a steady 50% cpu usage is expected if we invalidate the grid every second?
If so, how would you recommend optimising the performance of the invalidate. Would it be advisable to maintain a list of StyleInfo objects, and updating this list on data update, and invalidating only the cells that have changed? I am not sure in terms of memory usage if this is a good idea.
Thank you for posting query to us.
Yes. It is OK. When many paints are made to the appearance of a control, you should invoke the BeginUpdate method to temporarily freeze the drawing of the control. This results in less distraction to the user, and a performance gain. After all updates have been made, invoke the EndUpdate method to resume drawing of the control.
It is difficult to identify the issue without a working sample. Could you please update us with a minimal sample that shows the issue?. Also please look at the browser sample in the following location that is shipped with our products.