Show theme settings Shopping cart Download trialFree Trial
Change Theme Settings
Change Theme Settings
Show All Themes

Exporting Data

Note: If you export grouped data to RTF, be sure to open the resulting file with an editor that fully supports RTF, including tables. For instance, Microsoft WordPad does not support this feature, and thus the file may appear corrupt.
  • Export to PDF
  • Export to XLS
  • Export to XLSX
  • Export to DOCX
  • Export to RTF
  • Export to CSV
Country Ascending
City Ascending
Company Name 
Unit Price 
CollapseCountry: Argentina (Sum=$8,119.10, Count=34) (Continued on the next page)
 CollapseCity: Buenos Aires (Sum=$8,119.10, Count=34) (Continued on the next page)
  Cactus Comidas para llevar$46.007$322.00
  Cactus Comidas para llevar$7.7520$155.00
  Cactus Comidas para llevar$12.501$12.50
  Rancho grande$81.005$405.00
  Rancho grande$263.502$527.00
  Océano Atlántico Ltda.$18.6012$223.20
  Océano Atlántico Ltda.$8.0012$96.00
  Cactus Comidas para llevar$18.003$54.00
 Count=2,155  Sum=$1,354,458.59
Page 1 of 225 (2245 items)Prev1234567223224225Next

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:

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.

See Also:
Local Copy of this Demo
To inspect the source code for this demo on your machine, you must first install our components via the DevExpress Component Installer.
You can open a local copy of this online demo directly from this webpage (if using v20.2.8, 21.1.4 or higher).
Open CS Solution
The source code files for this demo are installed (by default) in the following directory:
\Users\Public\Documents\DevExpress Demos XX.X\Components\ASP.NET\CS\MVCxGridViewDemos