You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* change a theme
* change formats available for export
* update the version
* Created a new file CODEOWNERS [skip ci]
* README auto update [skip ci]
* fix theme adding
---------
Co-authored-by: DevExpressExampleBot <[email protected]>
Co-authored-by: DevExpressExampleBot <[email protected]>
# Grid for Blazor - How to Export Data to PDF, XLSX, and DOCX formats in a server application
8
+
# Blazor Grid - How to Export Data to DOCX, HTML, and MHT formats in a server application
9
9
10
-
The [Grid](https://docs.devexpress.com/Blazor/403143/grid) component allows you to [export data](https://demos.devexpress.com/blazor/Grid/Export/DataAwareExport) to XLS, XLSX, and CSV file formats. You can also use DevExpress Reporting tools to implement export to different formats (PDF, XLSX, and DOCX). This example illustrates how to do this in a Blazor Server application.
10
+
The [Grid](https://docs.devexpress.com/Blazor/403143/grid) component allows you to [export data](https://demos.devexpress.com/blazor/Grid/Export/DataAwareExport) to PDF, XLS, XLSX, and CSV file formats. You can also use DevExpress Reporting tools to implement export to different formats (DOCX, HTML, and MHT). This example illustrates how to do this in a Blazor Server application.
11
11
12
-

12
+

13
13
14
14
The `DxGrid` component is bound to an [IQueryable<T>](https://docs.microsoft.com/en-us/dotnet/api/system.linq.iqueryable-1) data collection (use the [GridDevExtremeDataSource](https://docs.devexpress.com/Blazor/DevExpress.Blazor.GridDevExtremeDataSource-1)). The [CustomizeLoadOptions](https://docs.devexpress.com/Blazor/DevExpress.Blazor.GridDevExtremeDataSource-1.CustomizeLoadOptions) property is used to obtain information about the grid's state.
15
15
16
16
To export information, apply the [ExportMiddleware](./CS/GridExportingWithReports/Helpers/ExportMiddleware.cs) type to the application request pipeline. The **ExportMiddleware** handles requests. The response returns the file of the corresponding type.
17
17
18
18
The [ExportButtons](./CS/GridExportingWithReports/Shared/ExportButtons.razor) component contains export buttons. Each export button contains an [URI to this project](./CS/GridExportingWithReports/Pages/Index.razor#L32), and the URI contains the Grid options. The created report contains only data that is visible in the grid after sort and filter operations. The **ExportMiddleware** processes the request with the URI.
19
19
20
-
Use the [ReportHelper.CreateReport](./CS/GridExportingWithReports/Helpers/ReportHelper.cs#L9) method with the [ExportToPdf(String)](https://docs.devexpress.com/XtraReports/DevExpress.XtraReports.UI.XtraReport.ExportToPdf(System.String-DevExpress.XtraPrinting.PdfExportOptions))/[ExportToXlsx(Stream)](https://docs.devexpress.com/XtraReports/DevExpress.XtraReports.UI.XtraReport.ExportToXls(System.IO.Stream-DevExpress.XtraPrinting.XlsExportOptions))/[ExportToDocx(Stream)](https://docs.devexpress.com/XtraReports/DevExpress.XtraReports.UI.XtraReport.ExportToDocx(System.IO.Stream-DevExpress.XtraPrinting.DocxExportOptions)) methods to create a report that is exported to the file of the corresponding type.
20
+
Use the [ReportHelper.CreateReport](./CS/GridExportingWithReports/Helpers/ReportHelper.cs#L9) method with the [ExportToDocx(Stream)](https://docs.devexpress.com/XtraReports/DevExpress.XtraReports.UI.XtraReport.ExportToDocx(System.IO.Stream-DevExpress.XtraPrinting.DocxExportOptions))/[ExportToHtml(Stream)](https://docs.devexpress.com/XtraReports/DevExpress.XtraReports.UI.XtraReport.ExportToHtml(System.IO.Stream-DevExpress.XtraPrinting.HtmlExportOptions))/[ExportToMht(String)](https://docs.devexpress.com/XtraReports/DevExpress.XtraReports.UI.XtraReport.ExportToMht(System.String-DevExpress.XtraPrinting.MhtExportOptions)) methods to create a report that is exported to the file of the corresponding type.
21
21
22
22
<!-- default file list -->
23
23
@@ -37,13 +37,12 @@ Use the [ReportHelper.CreateReport](./CS/GridExportingWithReports/Helpers/Report
37
37
38
38
## More Examples
39
39
40
-
[Grid for Blazor - How to use DevExpress Reporting tools to implement export in a WASM application](https://github.com/DevExpress-Examples/blazor-webassembly-dxdatagrid-export)
41
-
42
-
[How to use DevExpress Reporting Components in Blazor applications](https://github.com/DevExpress-Examples/how-to-use-reporting-components-in-blazor-applications)
40
+
*[Grid for Blazor - How to use DevExpress Reporting tools to implement export in a WASM application](https://github.com/DevExpress-Examples/blazor-webassembly-dxdatagrid-export)
41
+
*[How to use DevExpress Reporting Components in Blazor applications](https://github.com/DevExpress-Examples/how-to-use-reporting-components-in-blazor-applications)
43
42
<!-- feedback -->
44
-
## Does this example address your development requirements/objectives?
0 commit comments