Skip to content

Latest commit

 

History

History
55 lines (36 loc) · 4.42 KB

File metadata and controls

55 lines (36 loc) · 4.42 KB

Grid for Blazor - How to Export Data to PDF, XLSX, and DOCX formats in a WebAssembly application

The Grid component allows you to export data in XLS, XLSX, and CSV formats. You can also use DevExpress Reporting tools to implement export to different formats (PDF, XLSX, and DOCX). This example illustrates how to accomplish this task in a Blazor WebAssembly application.

Exported PDF

Quick Start

The export application should connect to the same port that the Web API application uses. Start the Web API application, copy the port number from the URL, and paste the clipboard content to the MyWebApiUrl variable:

Localhost Port

Overview

The code example uses the GridDevExtremeDataSource to bind the Grid to an IQueryable data collection published as an HTTP service. The CustomizeLoadOptions property customizes load options before the Grid loads data.

The ExportButtons component displays buttons that allow you to export data to PDF, XLSX, and DOCX files. When you click a button, it sends a request with the corresponding file format to the ExportedDocument controller method. The method creates a report based on the Grid layout and exports the report to a PDF, XLSX, or DOCX file. Once the export operation is completed, the button downloads the resulting file to your computer.

Files to Look At

Documentation

More Examples

Does this example address your development requirements/objectives?

(you will be redirected to DevExpress.com to submit your response)