I''m printing a grid with multiple pages. Since I want to add a second grid beneath this grid on the last page only, I need the size or the number of columns of the grid on the last page.
Where can I get this value to position my second grid on the last page?
ADAdministrator Syncfusion Team January 18, 2005 02:00 AM
Take a look at the gridControl1.PrintInfo object. It has members like m_awPageFirstCol and m_awPageFirstRow which are arraylists of the first column/row on each page.
If you get the first row on the last page, you can use grid.Model.RowHeights.GetTotal(firstRow, grid.Model.RowCount) + grid.Model.RowHeights.GetTotal(0, grid.Model.HeaderCount) to get the height of the grid on the last page. Then I think you can use this height in conjunction with the margins to decide where the bottom of the grid is.
FLFrank LausJanuary 18, 2005 02:35 AM
Thanks for the quick answer!
Is there any documentation for PrintInfo - I can''t find it in the help files.
ADAdministrator Syncfusion Team January 18, 2005 02:56 AM
No. If you have the source code, you can see their use in the GridPrintDocument class.
This class was exposed temporarily to allow users access to members that are useful in doing custom printing. We plan to extend the printing support in future releases and these members may change at that point.