[Expand]General Information
[Expand]WinForms Controls
[Collapse]ASP.NET Controls and MVC Extensions
 [Expand]Prerequisites
 [Expand]What's Installed
 [Expand]Common Concepts
 [Collapse]ASP.NET WebForms Controls
   Getting Started
  [Collapse]Grid View
   [Expand]Product Information
    Getting Started
   [Expand]Fundamentals
   [Collapse]Concepts
    [Expand]Binding to Data
    [Expand]Data Representation Basics
    [Expand]Focus and Navigation
    [Expand]Data Editing
    [Expand]Data Shaping and Manipulation
    [Expand]Data Formatting
    [Expand]Master-Detail Relationship
     Appearance Customization
     Adaptivity
     Save and Restore Layout
    [Expand]Templates
    [Collapse]Export
      Built-in Export
      Custom Export
     Toolbars
    [Expand]ASPxGridLookup
    ASPxGridView Designer
   [Expand]Visual Elements
   [Expand]Examples
   [Expand]Member Tables
   [Expand]ASPxGridView - Animated Images
  [Expand]Tree List
  [Expand]Card View
  [Expand]Reporting
  [Expand]Chart Control
  [Expand]Pivot Grid
  [Expand]Spreadsheet
  [Expand]Rich Text Editor
  [Expand]Scheduler
  [Expand]Site Navigation and Layout
  [Expand]HTML Editor
  [Expand]Gauges
  [Expand]Vertical Grid
  [Expand]Data Editors
  [Expand]Docking and Popups
  [Expand]File Management
  [Expand]Data and Image Navigation
  [Expand]Multi-Use Site Controls
  [Expand]Spell Checker
  [Expand]Query Builder
 [Expand]ASP.NET MVC Extensions
 [Expand]Localization
 [Expand]Redistribution and Deployment
  Get More Help
 [Expand]API Reference
[Expand]ASP.NET Bootstrap Controls
[Expand]ASP.NET Core Bootstrap Controls
[Expand]WPF Controls
[Expand]Xamarin Controls
[Expand]Windows 10 App Controls
[Expand]Office File API
[Expand]Reporting
[Expand]Report and Dashboard Server
[Expand]Dashboard
[Expand]eXpressApp Framework
[Expand]CodeRush
[Expand]CodeRush Classic
[Expand]Cross-Platform Core Libraries
[Expand]Tools and Utilities
 End-User Documentation

Built-in Export

Supported Versions

The information in this topic applies to DevExpress ASP.NET Grid View version 17.2 and later.

ASPxGridView data exporting can be implemented using the built-in standard toolbar and context menu commands, client-side and server-side API.

Note

Exporting using the built-in toolbar/context menu commands and client-side API is disabled by default due to possible security issues. To enable this functionality, set the ASPxGridExportSettings.EnableClientSideExportAPI property to true.

  • Standard toolbar commands

    The ASPxGridView toolbar provides frequently used grid command including export commands. Specify a standard grid exporting command (listed below) using the GridViewToolbarItem.Command property setting. Refer to the ASPxGridView toolbars topic or Toolbar online demo for more information on using grid toolbars.

  • Context menu commands

    The ASPxGridView allows exporting its data using the context menu commands. Use the ASPxGridView.FillContextMenuItems event to add an Export item. To process the Export item click, handle the client-side ASPxClientGridView.ContextMenuItemClick and server-side ASPxGridView.ContextMenuItemClick events. Refer to the context menu topic or Context Menu online demo for more information on using the grid's context menu.

  • Exporting API

    Execute an appropriate server or client method to implement grid data exporting. See Member Table: Built-in Export for a list of available methods.

    The following examples illustrate how to use client and server exporting methods:

    • Client API

    • Server API

Use the ASPxGridViewDetailSettings.ExportMode property to specify which detail rows are exported. For instance, set this property to Expanded to export only master rows and expanded detail rows.

You can customize the exported grid elements' appearance with the ASPxGridView.StylesExport property.

Note

The ASPxGridView cannot export data columns that are hidden or export templates' content. If the grid is in a GridViewTemplates.DetailRow template, ASPxGridView allows exporting both master and detail data.

Note that templated elements are exported with their default representation. For instance, if you export a grid with templated cells, they are represented as default labels with text in the obtained file.

Expanded Excel Data Aware Export

When exporting data in both XLS and XLSX formats, the following grid data is maintained in the resulting excel document:

  • Data grouping - with the ability to collapse/expand groups within a worksheet.
  • Data sorting and filtering - allowing end-users to display relevant data in the desired order.
  • Totals and group summaries - with the ability to modify/change formulas.
  • Format conditions - with the ability to modify/change conditional formatting rules.
  • Data validation for combo-box columns
  • Fixed columns
See the Knowledge Base Article: ASPxGridView / MVC GridView Extension - Excel Data Aware Export FAQ for more information.

Expanded Export Limitations

Data Aware Mode Limitations

You can avoid the specified limitations using the WYSIWYG (What You See Is What You Get) export mode. However, table formatting is lost in this mode.

Expanded Online Demos

Expanded Member Table

Expanded Task-Based Help

Is this topic helpful?​​​​​​​