Back to Devexpress

DashboardViewer.DashboardSource Property

dashboard-devexpress-dot-dashboardwin-dot-dashboardviewer.md

latest5.5 KB
Original Source

DashboardViewer.DashboardSource Property

Gets or sets a dashboard supplier for the DashboardViewer.

Namespace : DevExpress.DashboardWin

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

NuGet Package : DevExpress.Win.Dashboard

Declaration

csharp
[DefaultValue(null)]
public object DashboardSource { get; set; }
vb
<DefaultValue(Nothing)>
Public Property DashboardSource As Object

Property Value

TypeDefaultDescription
Objectnull

A Object value specifying a dashboard supplier for the DashboardViewer.

|

Remarks

There are two ways to provide a dashboard to be opened in the DashboardViewer using the DashboardSource property.

  1. Using a dashboard XML definition.

  2. Using a dashboard created at design time.

Note

If the DashboardDesigner / DashboardViewer control is placed in the MDI child form, load dashboards in the Shown event handler instead of Load.

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

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-how-to-manage-dashboard-parameters-in-code/CS/CustomParametersExample/ViewerForm1.cs#L11

csharp
dashboardViewer.CustomParameters += DashboardViewer_CustomParameters;
dashboardViewer.DashboardSource = typeof(SampleDashboard);
dashboardViewer.Dashboard.Parameters.Add(CreateParameter());

how-to-display-the-total-value-above-each-pie-chart/CS/TotalsInChartsExample/Form1.cs#L14

csharp
dashboardViewer1.CalculateHiddenTotals = true;
    dashboardViewer1.DashboardSource = typeof(Dashboards.Dashboard1);
}

winforms-viewer-save-and-apply-dashboard-state/CS/WinFormsViewerSaveAndApplyDashboarState/ViewerForm1.cs#L16

csharp
dashboardViewer.SetInitialDashboardState += dashboardViewer_SetInitialDashboardState;
    dashboardViewer.DashboardSource = path;
}

winforms-dashboard-how-to-manage-dashboard-parameters-in-code/VB/CustomParametersExample/ViewerForm1.vb#L14

vb
AddHandler dashboardViewer.CustomParameters, AddressOf DashboardViewer_CustomParameters
dashboardViewer.DashboardSource = GetType(SampleDashboard)
dashboardViewer.Dashboard.Parameters.Add(CreateParameter())

how-to-display-the-total-value-above-each-pie-chart/VB/TotalsInChartsExample/Form1.vb#L14

vb
dashboardViewer1.CalculateHiddenTotals = True
    dashboardViewer1.DashboardSource = GetType(Dashboards.Dashboard1)
End Sub

winforms-viewer-save-and-apply-dashboard-state/VB/WinFormsViewerSaveAndApplyDashboarState/ViewerForm1.vb#L15

vb
AddHandler dashboardViewer.SetInitialDashboardState, AddressOf dashboardViewer_SetInitialDashboardState
    dashboardViewer.DashboardSource = path
End Sub

See Also

DashboardViewer Class

DashboardViewer Members

DevExpress.DashboardWin Namespace