Back to Devexpress

IDashboardControl.CustomExport Event

dashboard-devexpress-dot-dashboardwin-dot-idashboardcontrol-e5400a40.md

latest7.0 KB
Original Source

IDashboardControl.CustomExport Event

Allows you to customize the exported document.

Namespace : DevExpress.DashboardWin

Assembly : DevExpress.Dashboard.v25.2.Win.dll

NuGet Package : DevExpress.Win.Dashboard

Declaration

csharp
event CustomExportEventHandler CustomExport
vb
Event CustomExport As CustomExportEventHandler

Event Data

The CustomExport event's data class is CustomExportEventArgs. The following properties provide information specific to this event:

PropertyDescription
ExportActionGets the export action performed by an end-user. Inherited from CustomExportBaseEventArgs.
ExportModeGets the document export mode. Inherited from CustomExportBaseEventArgs.
ImageExportOptionsGets export options related to exporting a dashboard/dashboard item as an image. Inherited from CustomExportBaseEventArgs.
ItemComponentNameGets the component name of the exported dashboard item. Inherited from CustomExportBaseEventArgs.
PdfExportOptionsGets export options related to exporting a dashboard/dashboard item to PDF format. Inherited from CustomExportBaseEventArgs.
PrintPreviewOptionsGets options related to printing a dashboard/dashboard item using the Print Preview window. Inherited from CustomExportBaseEventArgs.
ReportGets the underlying report of the exported document.

The event data class exposes the following methods:

MethodDescription
GetChartContext(String)Returns chart context for the specified Chart dashboard item.
GetGaugeContext(String)Returns gauge export context for the specified Gauge dashboard item.
GetItemData(String)Returns multidimensional data for the specified dashboard item.
GetPrintableControl(String)Gets a printable control corresponding to the specified dashboard item.
GetPrintableControls()Gets printable controls corresponding to the exported dashboard items.

Remarks

The Dashboard Control raises the CustomExport event in the following cases:

  • When you invoke the Print Preview dialog or change the previewed document’s settings (margins, orientation).

  • Before saving the exported document to PDF and as Image formats.

The event allows you to customize the exported document.

The following code snippets (auto-collected from DevExpress Examples) contain references to the CustomExport event.

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.

winforms-dashboard-display-each-series-in-separate-pane-for-chart-items/CS/MultiPaneExtension/MultiPaneModule.cs#L43

csharp
this.dashboardControl.DashboardItemControlUpdated += DashboardItemControlUpdated;
this.dashboardControl.CustomExport += CustomExport;

dashboard-constant-lines/CS/ConstantLineExtension.Win/ConstantLineModule.cs#L31

csharp
this.dashboardControl = dashboardControl;
this.dashboardControl.CustomExport += Win_CustomExport;
this.dashboardControl.DashboardItemControlUpdated += DashboardItemControlUpdated;

winforms-dashboard-display-each-series-in-separate-pane-for-chart-items/VB/MultiPaneExtension/MultiPaneModule.vb#L41

vb
AddHandler Me.dashboardControl.DashboardItemControlUpdated, AddressOf DashboardItemControlUpdated
AddHandler Me.dashboardControl.CustomExport, AddressOf CustomExport

See Also

IDashboardControl Interface

IDashboardControl Members

DevExpress.DashboardWin Namespace