Free Trial Buy Now

Grid View - Exporting Data

         

Note: When exporting grouped data to an RTF file, be certain to open the resulting file with an editor that fully supports RTF, including tables. Microsoft WordPad does not support this feature and thus the file may appear incorrectly.

Country(Ascending)
 
City(Ascending)
Company Name
Unit Price
Quantity
Total
[Expand]Country: Argentina (Sum=$8,119.10, Count=34)
[Expand]Country: Austria (Sum=$139,496.63, Count=125)
[Expand]Country: Belgium (Sum=$35,134.98, Count=56)
[Expand]Country: Brazil (Sum=$114,968.48, Count=203)
[Expand]Country: Canada (Sum=$55,334.10, Count=75)
[Expand]Country: Denmark (Sum=$34,782.25, Count=46)
[Expand]Country: Finland (Sum=$19,778.45, Count=54)
[Expand]Country: France (Sum=$85,498.76, Count=184)
[Expand]Country: Germany (Sum=$244,640.63, Count=328)
[Expand]Country: Ireland (Sum=$57,317.39, Count=55)
 Count=2,155  Sum=$1,354,458.59
Page 1 of 3 (21 items)
Prev
1
2
3
Next

Description

The MVC Grid View allows you to export its data with ease. Using specific static methods provided at the GridViewExtension class level, the GridView's data can be exported to a file or stream in the following formats:

  • PDF (WritePdf, ExportToPdf)
  • XLS (WriteXls, ExportToXls)
  • XLSX (WriteXlsx, ExportToXlsx)
  • RTF (WriteRtf, ExportToRtf)

This demo illustrates how data within the Grid View can be exported to different formats - based on the Grid View's current settings (defined in a single location - within the Controller). These settings are passed to a View containing the grid’s markup - 'View(partial)' and they are also used by export methods.

Version: v2012 vol 2.8
Experience the DevExpress Difference Today
Demos with source code are included with an installation of DevExpress controls for ASP.NET. Refer to the Demos and Sample Applications topic to learn more.
To download your free evaluation copy of our award-winning ASP.NET libraries, visit the Downloads page
All DevExpress MVC Extensions ship as part of DXperience ASP.NET, Enterprise, and Universal.
To obtain pricing information, visit the Pricing Options page or contact us via Email at info@devexpress.com
or by telephone at +1 (818) 844-3383 between 8:30am and 5pm Pacific Time.