Skip to main content
All docs
V25.1
  • Export Modes

    • 2 minutes to read

    The ASPxGridView control can export data in DataAware and WYSIWYG (What You See Is What You Get) modes.

    You can specify the export mode at design time (using the ExcelExportMode property) or send the ExportType parameter to an export method at runtime.

    <dx:ASPxGridView ID="grid" runat="server" DataSourceID="CategoriesDataSource" KeyFieldName="CategoryID">
        <SettingsExport ExcelExportMode="WYSIWYG" />
        <%--...--%>
    

    DataAware Mode

    Supported formats: XLS and XLSX.

    This mode maintains the following data shaping settings in the exported document:

    • Data grouping
    • Data sorting and filtering
    • Totals and group summaries
    • Format conditions
    • Data validation for combo-box columns
    • Fixed columns

    Run Demo: Grid - Excel Data Aware Export

    API to Customize the Exported Grid Elements

    Limitations

    Unsupported API

    WYSIWYG Mode

    Supported formats: PDF, RTF, CSV, XLS, XLSX, and DOCX.

    This mode exports GridView data as plain text. The table formatting (such as grouping) is lost and summaries are converted to strings.

    Run Demo: Grid - Exporting to Different Formats

    API to Customize the Exported Grid Elements

    Limitations

    • The ASPxGridView control does not export HTML tags in data cells. Handle the ExportRenderBrick event to add HTML tags to exported documents.
    • Images rendered in the GridViewDataImageColumn column are not exported. Handle the ExportRenderBrick event to implement image export.
    • Template content is not exported (except for the detail grid in the DetailRow template). Templated elements are exported with their default representation. For instance, templated cells are exported as labels with text.
    • Rich text formatting is ignored in ReportHeader and ReportFooter property values.

    Unsupported API