Skip to main content

Exporting

  • 3 minutes to read

XAF allows you to export List View data and analysis data to various formats (XLS, PDF, CSV, etc.). The following View Controller ship with the export functionality:

Export List View Data (ASP.NET Core Blazor and Windows Forms)

The Export Controller is designed to export List View data. If the default implementation of the Export Controller does not meet your needs, handle its events or the events of its platform-specific descendant:

ASP.NET Core Blazor
BlazorExportController
Windows Forms
WinExportController

The controllers mentioned above contain the Export to Action. To see examples of how to customize this Action, refer to the following topic: How to: Customize the Export Action Behavior.

The Export to Action is activated for the current List View if the List Editor supports the IExportable interface and the List Editor’s control supports the IPrintable interface. Editors that meet these criteria depend on your application platform.

Platform

List Editors that Support IExportable

ASP.NET Core Blazor

DxGridListEditor

DxTreeListEditor

DxChartListEditor

Windows Forms

GridListEditor

PivotGridListEditor

ChartListEditor

SchedulerListEditor

TreeListEditor

When you use any of the XAF List Editors mentioned above, your application already includes the export functionality without the need to add a line of code. If you use a custom List Editor to present a List View, its data can be exported as well. To do this, make sure that this List Editor supports the IExportable interface and the editor’s control implements the IPrintable interface.

ASP.NET Core Blazor

The Export to Action exports List View data to a memory stream. This Action is displayed in List Views whose EditorType is DxGridListEditor or DxTreeListEditor.

The supported export formats are:

  • PDF
  • CSV
  • XLS
  • XLSX

To export List View data, follow the steps below:

  1. Click Export to | {Format_Name} File on the List View main toolbar.

    DevExpress XAF - Export ListView Data in ASP.NET Core Blazor apps

  2. The application saves the exported file to your device. The file name is the name of the exported List View.

To perform this operation, XAF uses the data-aware export that ships with the DevExpress Blazor Grid. For more information on this functionality and its limitations, refer to the following topic: Blazor Grid - Export Data.

Windows Forms

The Export to Action exports data to a file stream. The supported file formats are:

  • XLS
  • HTML
  • Text
  • MHT
  • PDF
  • RTF
  • Image

To export List View data, follow the steps below:

  1. Select File | Export to | {Format_Name} File from the main menu.

    Export_1

  2. Specify a file name/location and click Save.

    Export_SaveAs

    To localize the Save as type filter captions, use the Localization | OpenSaveDialogFilters node in the Model Editor.