Example of Default Exporting in ASP.NET Core Data Grid Control
This sample demonstrates the client-side exporting of the Grid, which allows you to export its data to the Excel, PDF, and CSV formats. Use the toolbar buttons to export Grid data to the desired format.
Employee Image | Name | Designation | Email ID | Hire Date | Address |
---|---|---|---|---|---|
![]() | Nancy | Sales Representative | 5/1/1992 | 507 - 20th Ave. E.Apt. 2A | |
![]() | Andrew | Vice President, Sales | 8/14/1992 | 908 W. Capital Way | |
![]() | Janet | Sales Representative | 4/1/1992 | 4110 Old Redmond Rd. | |
![]() | Margaret | Sales Representative | 5/3/1993 | 14 Garrett Hill | |
![]() | Steven | Sales Manager | 10/17/1993 | Coventry HouseMiner Rd. | |
![]() | Michael | Sales Representative | 10/17/1993 | 7 Houndstooth Rd. | |
![]() | Robert | Sales Representative | 1/2/1994 | Edgeham HollowWinchester Way | |
![]() | Laura | Inside Sales Coordinator | 3/5/1994 | 722 Moss Bay Blvd. | |
![]() | Anne | Sales Representative | 11/15/1994 | 4726 - 11th Ave. N.E. |
Export template column
|
|
Grid supports client-side exporting which allows you to export its data to the Excel, PDF, and CSV formats.
In this demo, while exporting, we have included images and hyperlinks from the template columns i.e Image and URL
using the
excelQueryCellInfo
and
pdfQueryCellInfo
events. The ExcelExport, PdfExport, and CsvExport items are defined in the toolbar,
for which we have defined actions in the toolbarClick event to export the Grid data using the
excelExport
, pdfExport
, and csvExport
methods.
Note: Since CSV format supports only plain text, images and hyperlinks will not be exported on this.