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


I have some problems understanding how print feature works. The samples shipped with the grid seam to show that you simply create an image and send it to the printer. Is it true ? How far can we go setting what we want to print : a specified area, some other info, page numbering, header and footers, repeated headers with some advanced features like even pages... Thanks

2 Replies

AD Administrator Syncfusion Team March 30, 2005 04:31 PM UTC

Also, since we have to "draw" on the surface of the grid image, we have to handle the different formats like letter or A4 in Europe, Portrait and Landscape...

AD Administrator Syncfusion Team March 30, 2005 04:51 PM UTC

The grid uses the default .NET framework printing support offerred by the frameworks PrintDocument class. You can hook into this architecture and control what part of the print page you want to allow the grid to occupy, and then you are free to use the left-over real estate to print whatever you want to draw in that area. If you go to the grid KB and search for Print, you will get 5 hits that show how to do particular printing tasks. If you want to allocate the same size rectangle for the grid on every page, it simplifies the process as you can set teh default page settings to specify this fixed sized rectange, an dthen use the standard GridPrintDocument class to manage the printing, and it will properly compute the portions of the grid that appear on each page. If you want to vary the space allocated to the grid, then you would have to derive the GridProntDocument and override OnBeginPrint, and compute the portions of the grid that go on each page using your varying rectangle (that varies with the page). The default implementation does not handle this.

Live Chat Icon For mobile
Up arrow icon