Back to Devexpress

CustomExportEventArgs.GetPrintableControl(String) Method

dashboard-devexpress-dot-dashboardcommon-dot-customexporteventargs-dot-getprintablecontrol-x28-system-dot-string-x29.md

latest4.4 KB
Original Source

CustomExportEventArgs.GetPrintableControl(String) Method

Gets a printable control corresponding to the specified dashboard item.

Namespace : DevExpress.DashboardCommon

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

NuGet Package : DevExpress.Dashboard.Core

Declaration

csharp
public XRControl GetPrintableControl(
    string dashboardItemName
)
vb
Public Function GetPrintableControl(
    dashboardItemName As String
) As XRControl

Parameters

NameTypeDescription
dashboardItemNameString

A string that is the dashboard item’s component name.

|

Returns

TypeDescription
XRControl

A printable control corresponding to the specified dashboard item.

|

Remarks

The following table illustrates dashboard items and their corresponding printable XRControls:

Dashboard ItemXRControl
ChartDashboardItemXRChart
ScatterChartDashboardItemXRChart
PieDashboardItemXRChart
PivotDashboardItemXRPivotGrid
RangeFilterDashboardItem (When CustomExportBaseEventArgs.ExportMode is SingleItem)XRChart
GaugeDashboardItemXRGaugeDashboardItem
TextBoxDashboardItemXRTextBox

The following code snippet (auto-collected from DevExpress Examples) contains a reference to the GetPrintableControl(String) method.

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-pivot-custom-export/CS/WinformsExport/Form1.cs#L23

csharp
void dashboardViewer1_CustomExport(object sender, CustomExportEventArgs e) {
    XRPivotGrid pivot1 = e.GetPrintableControl("pivotDashboardItem1") as XRPivotGrid;
    XRPivotGrid pivot2 = e.GetPrintableControl("pivotDashboardItem2") as XRPivotGrid;

winforms-dashboard-pivot-custom-export/VB/WinFormsExport/Form1.vb#L25

vb
Private Sub dashboardViewer1_CustomExport(ByVal sender As Object, ByVal e As CustomExportEventArgs) Handles dashboardViewer1.CustomExport
    Dim pivot1 As XRPivotGrid = TryCast(e.GetPrintableControl("pivotDashboardItem1"), XRPivotGrid)
    Dim pivot2 As XRPivotGrid = TryCast(e.GetPrintableControl("pivotDashboardItem2"), XRPivotGrid)

See Also

CustomExportEventArgs Class

CustomExportEventArgs Members

DevExpress.DashboardCommon Namespace