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. Image for the cookie policy date

performance Issue while printing virtual grid

Hi Experts,

Our project is using syncfusion virtual grid to display/print a large number of image files.

We only override callback QueryCellInfo() which helps to load a specific image (as background image) for each cell.

Below method is invoked while printing:

OnDrawClientRowCol(int topRow, int leftCol, int bottomRow, int rightCol, Graphics g, Rectangle rectClip);

The problem is that only after every cell has been visited we can figure out the total height for Rectangle rectClip. System will set a default height for each cell.

Here is a workaround:
1. update each cell's height in QueryCellInfo()
2. after OnDrawClientRowCol() finished, system will check if gridMainControl's height got changed or not.
3. if changed, OnDrawClientRowCol() need to be invoked again.

So, OnDrawClientRowCol() will be invoked many times which causes a poor performance.

If anyone can help me...Is there any advanced api can make it better?

1 Reply

LS Lingaraj S Syncfusion Team November 24, 2009 08:21 AM UTC

Hi Peng,

Thank you for your interest in Syncfusion products.

If you want to show the image in cell, then please try using Image cell type QueryCellStyleInfo to achieve this functionality. And ImageSizeMode property is used to set the image drawing option in cell.

Refer the sample form below link:
http://help.syncfusion.com//samples/grid.windows/forums/GridImage.zip

Please let me know if you have any queries.


Regards,
Lingaraj S.

Loader.
Live Chat Icon For mobile
Up arrow icon