Configuration export

    Configures client-side export.

    Type: Object

    When client-side export is enabled, the grid toolbar contains the Export button ( DevExtreme DataGrid HTML5 Toolbar Exporting ) that exports grid data to Excel. For details on exporting, refer to the Client-Side Export article.

    NOTE: Exporting features require the JSZip library. Please add a reference to this library to your page. You can get it from the js folder of your DevExtreme Package or use the DevExpress CDN as shown below.

    HTML
    <script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/jszip/2.6.0/jszip.min.js"></script>

    View Demo

    Watch Video

    allowExportSelectedData

    Allows an end user to export selected rows only.

    Type: Boolean
    Default Value: false

    When this option is set to true, a click on DevExtreme DataGrid HTML5 Toolbar Exporting invokes a menu that contains the "Export selected rows" command.

    DevExtreme DataGrid Exporting Selected Rows

    See Also
    • export | texts | exportSelectedRows - customizes the text of the "Export selected rows" command.
    • selection | mode - enables selection in the widget.

    enabled

    Enables the client-side export feature.

    Type: Boolean
    Default Value: false

    NOTE: Your application/site must have a reference to the jszip.js (jszip.js.min) library. This library is accessible within your DevExtreme Package.

    excelFilterEnabled

    Specifies whether to enable Excel filtering for the exported data in the resulting XLSX file.

    Type: Boolean
    Default Value: false

    excelWrapTextEnabled

    Specifies whether to enable word wrapping for the exported data in the resulting XLSX file.

    Type: Boolean
    Default Value: undefined

    When this option is not set, the value of the grid's wordWrapEnabled option is used.

    fileName

    Specifies a default name for the file to which grid data is exported.

    Type: String
    Default Value: 'DataGrid'

    proxyUrl

    Specifies the URL of the server-side proxy that streams the resulting file to the end user to enable export in IE9 and Safari browsers.

    Type: String
    Default Value: undefined

    Generally, exporting is performed using client-side API in browsers. However, the IE9 and Safari (integrated in Mac OS) browsers do not implement an API for saving files. In this instance, the DataGrid widget can POST the content to a server-side proxy, which will stream the file back to the end user. To enable this functionality, set the export | proxyUrl option to the proxy, which will stream the file to the end user. When implementing the proxy, take the following information into account.

    • Your proxy will receive a POST request with the following parameters in the request body: fileName, contentType (the MIME type of the file) and base64 (the base-64 encoded file content).
    • The proxy should return the decoded file with the "Content-Disposition" header set to attachment; filename="".

    The sample proxy implementation for ASPx-based and PHP-based web servers is presented in the Set up a Server-Side Proxy article.

    texts

    Contains options that specify texts for the export-related commands and hints.

    Type: Object

    Use these options to provide custom texts for the export-related commands and hints or when localizing the widget.