Custom Export
- 2 minutes to read
Tip
In v17.2 and higher, we recommend that you use the client API and the built-in toolbar commands to export ASPxCardView data.
ASPxCardView allows you to use the ASPxCardViewExporter component or the built-in export mechanism (via the standard toolbar commands, client-side API, or server-side API) to export grid data to a file or stream in PDF, RTF, CSV, DOCX, XLS, and XLSX formats.
Assign ASPxCardView’s ID to the ASPxCardViewExporter.CardViewID property and select the export method. For example, use the ASPxGridExporterBase.WriteXlsToResponse method to export data to a file in XLS format.
The ASPxCardViewExporter.Styles property allows you to customize the exported grid element appearance.
Note
- ASPxCardViewExporter cannot export hidden data columns or template content.
- Templated elements are exported with their default display settings. 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.