This example shows how to add a custom Export to PDF button that exports all dashboard items into the same PDF document.
On the client, the ViewerApiExtensionOptions.onDashboardTitleToolbarUpdated event is handled to modify the dashboard title and add the custom export button to it. This functionality is encapsulated into a custom dashboard extension (the ExportAllItemsExtension.js file).
To perform the export operation, the client sends a GET request to a custom Export Controller.
The custom Export Controller processes requests from the client side. This controller uses the following classes:
- The WebDashboardExporter class exports dashboard items to PDF.
- The PdfDocumentProcessor class joins exported documents together.
- ExportAllItemsExtension.js
- Startup.cs
- CustomDashboardStorage.cs
- ExportController.cs
- DashboardExportModel.cs
- _Layout.cshtml
- Index.cshtml
- Dashboard for ASP.NET Core - How to load and save dashboards from/to a database
- Dashboard for MVC - How to implement server-side export
(you will be redirected to DevExpress.com to submit your response)