Example of Multiple Exporting in ASP.NET MVC Data Grid Control

This sample demonstrates the client-side exporting of mutliple grids, which allows you to export the data of multiple grids in the same or different pages to Excel and PDF formats.

DEMO
SOURCE

Master Grid

Showing orders of Customer ID:

Data Grids support client-side exporting which allows you to export data to Excel and PDF formats.

Multiple grids can be exported by providing their IDs in the exportGrids property.

In this demo, Excel and PDF exports are enabled in both grids by setting the allowExcelExport and allowPdfExport properties to true. In the master grid, the grid IDs are listed in the exportGrids property which can be exported to Excel and PDF formats by clicking the toolbar buttons.

The ExcelExport and PdfExport items are defined in the toolbar of the Grid. Actions are defined in the toolbarClickopens in a new tab event to export Grid data using excelExportopens in a new tab and pdfExportopens in a new tab methods.

By default, in this demo grids are exported on the same page. They can be exported in separate pages by unchecking the checkbox. This can be achieved by setting the multipleExport type of ExcelExportPropertiesopens in a new tab and PdfExportProperties.opens in a new tab

More information on the exporting configuration can be found in this Excel-exportopens in a new tab and PDF-exportopens in a new tab documentation sections.

Transform your ASP.NET MVC web apps today with Syncfusion® ASP.NET MVC components
100+ high-performance and responsive UI components
Dedicated support
Hassle-free licensing
TRY IT FOR FREE
opens in a new tab