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

Print, zoom, Adjust to

Hi, I’m trying to create a zoom factor and a “fit the grid in x pages” when printing and print preview. The sample 3291 found in http://www.syncfusion.com/Support/Forums/message.aspx?MessageID=10310 does exactly what I want to do but I can’t seem the find a suitable place to put the code so that it is only executer when the grid is being printed or print previewed. I want to replicate the “Adjust to” and “Fit to” option in the Page Setup of Excel. I’m using the grid version

4 Replies

AD Administrator Syncfusion Team July 5, 2005 07:00 PM UTC

You can try handling these 3 events. grid.QueryCellInfo grid.QueryRowHeights grid.QueryQueryColWidths If you are not printing (found out by testing grid.PrintingMode), just return without doing anything. If you are printing, then in QueryCellInfo, try setting e.Style.Font.Size *= up. In the other two events, set e.Size to the zoomed value and also set e.Handled = true. You may have to set a flag to avoid some recursive calls in these events.

SS Stephane SansCartier July 5, 2005 07:43 PM UTC

Exactly what I needed, thank!

LK Leow Kah Man July 31, 2006 02:49 AM UTC


I would like to request for Zoom feature to be present in GridControl.

This would be really helpful instead of having the users to manually code the zoom feature.


AD Administrator Syncfusion Team July 31, 2006 05:20 AM UTC

Hi Leow,

If we have enough requests, we will have this as a feature request and get it in the upcoming releases.


Live Chat Icon For mobile
Up arrow icon