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.
Unfortunately, activation email could not send to your email. Please try again.

Grid Painting Performance

Thread ID:

Created:

Updated:

Platform:

Replies:

38286 Dec 9,2005 06:50 AM Dec 15,2005 10:19 AM Windows Forms 2
loading
Tags: GridControl
Christopher Dugdale
Asked On December 9, 2005 06:50 AM

Hi, I use a GDBG and batch updates to the underlying datasource every 250 ms. Whilst doing the updates I suspend binding and drawing. When the updates are complete, I resume binding(OptimizeListChanged event is set to false) and drawing and call Refresh to update the grid. However the Refresh operation takes from 500 to 600 ms to complete. Most of this time is spent in the grids OnPaint method. During this time the usability of the GUI decreases. 1)The mouse tracking becomes jerky 2)Mouse clicks (selecting rows) are delayed 3)Keystroke entry into a non grid text box becomes erratic. If there anything I can do to decrease the time spent painting the grid? Or improve the ability of the main GUI thread to process other messages during the OnPaint method? Cheers Chris.

Administrator [Syncfusion]
Replied On December 9, 2005 09:06 AM

Hi Chris, Take a look at this sample in windows\Grid.Windows\Samples\Performance\TraderGridTest to see if that helps in boosting performance. This sample caches the rectangles that need to be redrawn and then uses DrawClippedGrid to draw these rectangles directly draw these rectangles. Also take a look at this thread in case you are using multithreads. Best regards, Stanley

Christopher Dugdale
Replied On December 15, 2005 10:19 AM

Hi Stanley. I have upgraded the grid to v 3.3 and now cache rectangles and use DrawClippedGrid as in the TraderGridTest. I also had to subclass the ListChanged event so that I could include the column name/index as well as the row index to allow me to do the cell based painting. Painting performance has increased substantially(compared with calling invalidate or Refresh) and has fixed many of my related issues. Thanks very much for the advice! Chris.

CONFIRMATION

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.

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.

;