The DataGrid Controls for ASP.NET WebForms applications are an amazing component for design modern user interface. This cool control provides large flexibility to meet any critical requirements of applications nowadays. Furthermore, The ASP.NET Data Grid Control for Web Forms provides support of the data exporting to a variety of file formats, including, PDF, Excel, Word, CSV, or plain text. All data customizing or formatting applied can be exported to these files.
Supported File Formats
KAX.Grid can export grid data to four file formats:
The Kettic GridView ASP.NET component provides the support of exporting data from grid to Microsoft Office document. This feature needn't the MS Office installation, however, allows the exported Excel or Word file being read in MS Excel spreadsheet/Word document 2003 and higher versions. At the same time, if you want to export the asp.net gridview to PDF document, there also no need Adobe software installaltion.
And users can changing the parameter FileName to customize the exported file name.
Exporting with Paging
If you want only to export current showing page in the grid, just set IgnorePaging property to False. And then, the output file only contains the current page data.
If you want to export all the data in the grid, you need set IgnorePaging property to True, and set PageSize property to the VirtualItemCount. When you export multiple pages of asp.net gridview out to Excel, the data will fill with multiple spreadsheets in the Excel, one page data is one sheet.
C# sample code:
Exporting with custom Rows
If you don't want to export the whole data out from the asp.net gridview, Kettic allows you export any parts of the grid view, such as single or multiple rows with continuous or discontiguous index.
C# example code:
Exporting with custom Columns
Similar with export rows, users can also determine which columns to export from the asp.net grid view.
Exporting with custom Style
When you export the data out to the file, the grid appearance or skin will not work in the file. If you want to make your exported file look different, you may change the GridDataItem.Style property. Additional, not only the skin, but also the grid layout, page layout will keep the original style in the asp.net gridview. And the font size, color, formatting will be hold. Note: this property only support exporting to PDF, Excel and Word.
You can set HeaderStyle.Width property to change the column size before export the data out to the file. And this property is only working for exporting to PDF, Excel and Word.
ASP.NET AJAX UI Controls