Skip to main content
A newer version of this page is available. .
Tab

ASPxGridViewExporter Class

An ASPxGridViewExporter control used to export the ASPxGridView control’s data.

Namespace: DevExpress.Web

Assembly: DevExpress.Web.v18.1.dll

Declaration

[ToolboxBitmap(typeof(ToolboxBitmapAccess), "Bitmaps256.ASPxGridViewExporter.bmp")]
[ToolboxTabName("DX.18.1: Data & Analytics")]
[Themeable(true)]
public class ASPxGridViewExporter :
    ASPxGridExporterBase

The following members accept/return ASPxGridViewExporter objects:

Remarks

The ASPxGridViewExporter component allows you to export the ASPxGridView’s data to a file or stream in various formats - PDF, RTF, XLSX, and XLS. To learn more, see Built-in Export .

Note that the ASPxGridViewExporter cannot export data columns that are hidden, nor can it export the content of templates. The exception is the ASPxGridView control within a GridViewTemplates.DetailRow template. ASPxGridViewExporter can identify a grid within this type of template, and allows both master and detail data to be exported.

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.

Note

Don’t export the ASPxGridView’s content during callbacks, because ASP.NET does not support sending binary content during a callback.

Note

Before exporting a grid, the ASPxGridViewExporter component creates an export document on a server. Therefore, when you export a large amount of data to a server with limited memory, the OutOfMemoryException exception can appear.

Example

This example demonstrates how to export grid data to a file in a PDF format using the ASPxGridBase.ExportPdfToResponse method.

PdfExportOptions options = new PdfExportOptions();
options.Compressed = false;
ASPxGridView1.ExportPdfToResponse(options);

The following code snippet (auto-collected from DevExpress Examples) contains a reference to the ASPxGridViewExporter class.

Note

The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.

See Also