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. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Advanced printing and PDF

Thread ID:





91703 Nov 29,2009 02:18 AM UTC Dec 2,2009 11:02 AM UTC WinForms 3
Tags: GridControl
Peter Trevor
Asked On November 29, 2009 02:18 AM UTC

I have a GridControl on my form that implements a virtual grid. I have added printing capabilities to it (print, print preview, page header, and page footer) and everything works great, except ...

I need to have a header section: one or more special pages that appear before the grid but as part of the same document. How do I do this?

Bonus question: How do I 'print' all this to a PDF document? (I have the full Enterprise Edition of ESS which includes Essential PDF.)

Jisha Joy [Syncfusion]
Replied On December 1, 2009 06:27 AM UTC


Thank you for posting query to us.

You need use the derived class GridPrintDocumentAdv for this purpose. Headers and footers can be added with the events called DrawGridPrintHeader and DrawGridPrintFooter. See the following browser sample for more details:

C:\Documents and Settings\[Username]\My Documents\syncfusion\essentialstudio\\Windows\Grid.Windows\Samples\2.0\Print\Print Grid Demo\cs

Regarding PDF export issue, please refer the following sample that implements the same.

C:\Documents and Settings\[Username]\My Documents\syncfusion\essentialstudio\\Windows\Grid.Windows\Samples\2.0\Export\PDF Export Demo\cs

Please let me know if you have any queries.


Peter Trevor
Replied On December 1, 2009 06:53 PM UTC

Hi Jisha

Thanks for the PDF part, that looks easy enough.

But for the main question ...

I already am using the GridPrintDocumentAdv with headers and footers as that example showed. I can print the grid with page headers and page footers okay. My problem is how do I add extra pages to the output, extra pages that are nothing to do with the grid but I'd like to be sent to the printer (or print preview) as part of the same print job. In other words I want to embed the grid print as part of a larger document.

Jisha Joy [Syncfusion]
Replied On December 2, 2009 11:02 AM UTC


I think you can do what you want by deriving GridPrintDocument and overriding OnPrintPage and print the the larger document at the begining. Please try this suggestion and let me know if this helps.



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.

Please sign in to access our forum

or the page will be automatically redirected to sign-in page in 10 seconds.

Warning Icon 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.Close Icon