Blazor DataGrid Example - Default Exporting
Order ID | Customer ID | Freight | Order Date | Ship Country |
|---|
| 10001 | ALFKI | $2.30 | 5/15/1991 | Denmark |
| 10002 | ANATR | $3.30 | 4/4/1990 | Brazil |
| 10003 | ANTON | $4.30 | 11/30/1957 | Germany |
| 10004 | BLONP | $5.30 | 10/22/1930 | Austria |
| 10005 | BOLID | $6.30 | 2/18/1953 | Switzerland |
| 10006 | ALFKI | $4.60 | 5/15/1991 | Denmark |
| 10007 | ANATR | $6.60 | 4/4/1990 | Brazil |
| 10008 | ANTON | $8.60 | 11/30/1957 | Germany |
| 10009 | BLONP | $10.60 | 10/22/1930 | Austria |
| 10010 | BOLID | $12.60 | 2/18/1953 | Switzerland |
| 10011 | ALFKI | $6.90 | 5/15/1991 | Denmark |
| 10012 | ANATR | $9.90 | 4/4/1990 | Brazil |
This sample demonstrates how to export DataGrid data to Excel, PDF, and CSV file formats.
The Blazor DataGrid provides comprehensive export functionality through toolbar buttons, allowing you to save grid data in multiple formats.
Export actions for toolbar items can be configured using the following methods:
- ExportToExcelAsync - Export data to Excel format with customizable properties.
- ExportToPdfAsync - Export data to PDF format with customizable properties.
- ExportToCsvAsync - Export data to CSV format with customizable properties.
In this demo, all three export methods are implemented in the toolbar for convenient data export.
For more detailed information about the exporting feature, refer to the exporting documentation.