Printing and Exporting
- 2 minutes to read
The DevExpress Silverlight DXGrid supports client-side printing and server-side exporting. Key features include:
- Complete customization of grid rows and cells in a printed document via templates and styles
Advanced Print Preview control
- Supported Export Formats: PDF, Excel, RTF, XPS, Text, CSV, MHT, HTML, Image (PNG, BMP, etc.)
Requirements:
- DevExpress.Xpf.Printing.vX.X assembly
#Printing Options
A view provides multiple options, styles and templates, that allow you to customize a printed document.
The following table lists printing options:
Property | Description |
---|---|
Table |
Specifies whether the grid is printed with all group rows expanded or not. |
Table |
Specifies whether printed column widths are automatically changed or not, so that the grid fits the width of the report page. |
Table |
Specifies whether column headers are printed or not. |
Table |
Specifies whether the Summary Panel is printed or not. |
The following table lists the styles and templates applied to grid elements when a view is printed.
Property | Description |
---|---|
Specifies a style applied to column cells when a grid is printed. | |
Specifies a style applied to column headers when a grid is printed. | |
Specifies a style applied to group rows when a grid is printed. | |
Specifies the style applied to total summary items when the grid is printed. | |
Specifies a template that defines the Summary Panel's presentation when a grid is printed. | |
Specifies a template that defines the presentation of group rows when a grid is printed. | |
Specifies a template that defines the presentation of column headers when a grid is printed. | |
Specifies thae template that defines the presentation of data rows when a grid is printed. |
The following table lists the Master-Detail specific printing options.
Property | Description |
---|---|
Specifies whether View's details are printed. | |
Specifies whether View's details that doesn't contain any data are printed. | |
Specifies the indents separating the details. |
#Data Export
To allow end-users to export a grid, do the following:
Add an export service for passing an exported grid to a Silverlight client.
- Specify an export link's ServiceUri property.
#Master-Detail Printing
The DXGrid supports printing and exporting master-detail data, allowing to control the manner in which detail rows are printed.