ExportToRadFixedDocument
In R1 2016, we introduced a new extension method related to the exporting of RadGridView - ExportToRadFixedDocument. You can use it if you need to modify the content of the exported RadGridView and avoid styling the document manually.
Assembly References
ExportToRadFixedDocument uses additional libraries so you need to add references to the following assemblies:
- Telerik.Windows.Controls.GridView.Export.dll
- Telerik.Windows.Documents.Core.dll
- Telerik.Windows.Documents.Spreadsheet.dll
- Telerik.Windows.Documents.Spreadsheet.FormatProviders.Pdf.dll
- Telerik.Windows.Zip.dll
Usage
This method exports the associated RadGridView to a RadFixedDocument object. Example 1 shows how you can rotate the exported page before exporting.
Example 1: Export RadGridView to a RadFixedDocument and rotate the page 90 degrees
GridViewDocumentExportOptions
The method can be overloaded and take GridViewDocumentExportOptions as a parameter. You can use it to set the following export options:
- Culture
- Items
- ShowColumnFooters
- ShowGroupFooters
- ShowColumnHeaders
- ExportDefaultStyles
The ExportToRadFixedDocument method utilizes the PdfProcessing library. You can check the respective documentation for more information on how to use the library.