We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

"Flicker" when updating cells in a "trader-like" real-time virtual grid

Thread ID:





51230 Nov 1,2006 12:07 AM UTC Nov 3,2006 07:33 AM UTC WinForms 5
Tags: GridControl
Erik Harris
Asked On November 1, 2006 12:07 AM UTC


I'm trying to get optimum performance for a frequently updating grid. Using your Trader grid example, I've implemented the DrawClippedGrid method for drawing updated cells. This works great as far as performance is concerned, but there's a "flicker" occasionally when a cell updates. On another thread, there was a reply that mentioned something about drawing the clipped grid to a bitmap, then drawing the bitmap to the grid (but no code). I've tried to implement this solution, but cannot get it working. I've attached the code I'm using:


Administrator [Syncfusion]
Replied On November 1, 2006 05:58 AM UTC

Hi Erik,

The flickering problem can be avoided by calling the Refresh method between the BeginUpdate() and EndUpdate() calls.

grid.EndUpdate( false );

Let me know if this helps.

Best Regards,

Erik Harris
Replied On November 1, 2006 03:04 PM UTC

Thanks for your reply, Haneef.

I'd like to avoid calling the "Refresh" method at all (for performance), which is why I'm using the DrawClippedGrid method for updating the cell.

If I wrap the DrawClippedGrid method call in the BeginUpdate - EndUpdate calls as you recommended, the flicker remains.

I was interested in the idea of drawing the clipped grid to a bitmap, then drawing the bitmap to the cell. Any sample code available for this option?

Thanks for your support.

Administrator [Syncfusion]
Replied On November 2, 2006 05:43 AM UTC

Hi Erik,

Instead of CreateGridGraphics(), if you could use GetCachedGraphics() (ver. 4.1), there will be better performance.

Please refer to the attached sample that caches the graphics object across paint calls and disposes it only when the grid gets disposed or its size was changed. The only further improvement you can do is to set:

this.gridControl1.UseDoubleBuffer = false;
this.gridControl1.UseGDI = true;

Sample : http://www.syncfusion.com/Support/user/uploads/PerformanceGrid_dce3029d.zip

Best Regards,

Erik Harris
Replied On November 2, 2006 09:00 PM UTC


Thanks again for your help.

With your suggestions, I've once again improved the performance of my grid.

Any suggestions for eliminating the flicker?


Administrator [Syncfusion]
Replied On November 3, 2006 07:33 AM UTC

Hi Erik,

There is another way you can freeze the painting. This technique works for any control and is discussed in one of our WIndows Forms FAQ. It adds aFreezePainting property to teh class that you can turn on and off. This technque has worked in situations where BeginUpdate is being cancelled for special reasons. Here is a forum thread that has teh references to the FAQ and includes a sample of how to use it.

Maybe this technique will work for you.




This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon