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.

Printing with FrozenColumns issue

Thread ID:





25011 Feb 16,2005 07:47 AM Feb 16,2005 12:57 PM Windows Forms 5
Tags: GridControl
Administrator [Syncfusion]
Asked On February 16, 2005 07:47 AM

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.

Administrator [Syncfusion]
Replied On February 16, 2005 07:59 AM

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);

Administrator [Syncfusion]
Replied On February 16, 2005 09:47 AM

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..

Administrator [Syncfusion]
Replied On February 16, 2005 10:36 AM

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.

Administrator [Syncfusion]
Replied On February 16, 2005 11:03 AM

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.

Administrator [Syncfusion]
Replied On February 16, 2005 12:57 PM

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


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.