Custom Export
- 2 minutes to read
Tip
Starting with version 17.2, we recommend using the client API and the built-in toolbar commands for ASPxCardView data exporting.
The ASPxCardView allows using the ASPxCardViewExporter component to export the grid data to a file or stream in PDF, RTF, CSV, DOCX, XLS, and XLSX format in addition to the built-in exporting mechanism (using the standard toolbar commands, client-side and server-side API).
Assign ASPxCardView’s ID to the ASPxCardViewExporter.CardViewID property and select the exporting method. For example, use the ASPxGridExporterBase.WriteXlsToResponse method to export data to a file in an XLS format.
The ASPxCardViewExporter.Styles property allows customizing the exported grid elements’ appearance.
Note
- The ASPxCardViewExporter cannot export hidden data columns or templates’ content.
- Templated elements are exported with their default representation. For instance, if you export a grid with templated cells, they are represented as default labels with text.
- When elements with specified border styles are exported, the Groove, Inset, Outset, and Ridge styles are exported as a Solid style.
Excel Format (XLS or XLSX) Export Limitations
- The ASPxCardViewExporter.Landscape and ASPxCardViewExporter.PaperKind properties are not in effect.
- The ASPxCardViewExporter.ReportHeader and ASPxCardViewExporter.ReportFooter properties are not in effect.
- The ASPxCardViewExporter.Styles property has no effect. Use either the CardViewColumn.ExportCellStyle at the column level or the XlsExportOptionsEx.CustomizeCell / XlsxExportOptionsEx.CustomizeCell event instead.
- The ASPxCardViewExporter.RenderBrick event does not fire. You can use the XlsExportOptionsEx.CustomizeCell or XlsxExportOptionsEx.CustomizeCell event instead.