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

Printing with FrozenColumns issue

Hi, I have a grid which has the frozen columns, but i need to print that grid. It should print in multiple page. for first page the width calculation done correctly, from the second page the problem starts. I don''t know how to find the width of frozen columns. But i don''t know the exact frozen column numbers.

5 Replies

AD Administrator Syncfusion Team February 16, 2005 12:59 PM UTC

The frozen columns should incluce column 0 up to and including grid.Cols.FrozenCount (grid.Model.Cols.FrozenCount in GridDataBoundGrid). So, the width of teh frozen columns should be int width = this.grid.Model.ColWidths.GetTotal(0,grid.Model.Cols.FrozenCount);

AD Administrator Syncfusion Team February 16, 2005 02:47 PM UTC

Thanks Clay , The issues here are, 1.In grid the colwidth of each column may differ. 2.While printing(or Preview) some columns missing the last character. I have used FitTo option also. 3.While colculating the number of columns to print in second page.I have find that, let it be for First page cols from 1 to 5 (Note: Here COL 1 and 2 are frozen so it will displayed in each page) Second page cols from 6 to 8 (Frozen cols must be present here also). Third Page Cols from 9 to 11 and so on.. For First page prints correctly as from 1 to 5 from secon page onwards it prints one col extra How do i fix it... Could you kindly Post me some sample code..

AD Administrator Syncfusion Team February 16, 2005 03:36 PM UTC

Are you using There were some problems with frozen column and printing in earlier versions. I am not sure I understand what you are doing. Normally, the grid computes the columns that will fit on a page, and prints them. Are you trying to print particular columns on particular pages? If so, then one way to do this is to subscribe to QueryColWidth and set the size of the columns to zero for any column you do not want to print. Here is a forum thread that discusses this idea. http://www.syncfusion.com/Support/Forums/message.aspx?MessageID=10972 If you can upload a sample showing the problem you are trying to solve (tell us how to see it in one of our samples), we can try to suggest a concrete solution.

AD Administrator Syncfusion Team February 16, 2005 04:03 PM UTC

No i am using syncfusion version I explain the problem once again. For printing i have used a custom PrintDocument class which is derived from GridPrintDocument and override the event OnBeginPrint and OnPagePrint event. But it doesnot pass any values to base. I am printing a grid that has nearly 11 columns In some columns when i print the document or while previewing i found the last character missing. To fix this i used FitTo option. But this doesn''t work. But in the grid (in application) all the characters in the column are visible. So i tried another way to fix this problem by increasing the width of the column by 4. This prints all the characters in the column. But it reflects in the application grid also.

AD Administrator Syncfusion Team February 16, 2005 05:57 PM UTC

You can try using the GraphicsUnits.World setting to see if that will show the text that is now being clipped for you. Here is a forum thread on this. http://www.syncfusion.com/Support/Forums/message.aspx?MessageID=8564

Live Chat Icon For mobile
Up arrow icon