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.
ADAdministrator Syncfusion Team 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);
ADAdministrator Syncfusion Team 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..
ADAdministrator Syncfusion Team February 16, 2005 10:36 AM
Are you using 184.108.40.206. 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.
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.
ADAdministrator Syncfusion Team February 16, 2005 11:03 AM
No i am using syncfusion version 220.127.116.11
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.
ADAdministrator Syncfusion Team 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.