The DevExpress ASP.NET Grid View (ASPxGridView) allows you to export data with ease. Data can be exported to a file or stream in PDF, RTF, CSV, XLS, XLSX, and DOCX formats. You can either rely on the grid's built-in UI or use the client and server APIs in code.
The ASPxGridView toolbar implements the following commands to export grid data: `ExportToPdf`, `ExportToXls`, `ExportToXlsx`, `ExportToDocx`, `ExportToRtf`, and `ExportToCsv`. Populate a grid toolbar with a GridViewToolbarItem object and set its Command property to an export command to add the corresponding item to the toolbar.
The export commands and the client API are disabled for security reasons (the default setting). To enable this functionality, set the EnableClientSideExportAPI property to `true`.
In this demo, export to table formats (XLS, XLSX, and CSV) is performed in the WYSIWYG (What You See Is What You Get) mode. Therefore, the table formatting, e.g., grouping, is lost and grid summaries are converted to strings. However, you can maintain such information by exporting grid data in the DataAware mode. You can see this functionality in the Excel Data Aware Export demo.
To learn more about data export in Grid View, refer to the Export Grid View Data help topic.