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.
Master Grid
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.