Kochkin / blazor-server-dxdatagrid-export

Blazor, DxDataGrid, https://www.devexpress.com/blazor/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Files to look at:

DataGrid for Blazor - Server application - How to implement the exporting functionality using DevExpress Reporting tools

This example illustrates how to use DevExpress Reporting tools to export DxDataGrid's content to different formats (.pdf/.xlsx/.docx) in the Blazor Server applications.

This example demonstrates how to apply the ExportMiddleware type to the application's request pipeline. Requests are handled via this middleware, and the file of the corresponding type is returned in the response.

The export buttons are located within the ExportButtons components. Each of them contains an URI to this project. The request with this URI will be processed by the mentioned middleware. Also, this URI contains DataGrid's options, so the created report will only contain data that is displayed in the grid after sorting and filtering are applied.

The ReportHelper.CreateReport method is used to create a report that is exported to the file of the corresponding type using the ExportToPdf(String)/ExportToXlsx(Stream)/ExportToDocx(Stream) method.

See also:

DataGrid for Blazor - Client side - How to implement the exporting functionality using DevExpress Reporting tools

How to use DevExpress Reporting Components in Blazor applications

About

Blazor, DxDataGrid, https://www.devexpress.com/blazor/

License:Other


Languages

Language:C# 65.8%Language:HTML 34.2%