DashboardViewer.DashboardSource Property

Gets or sets a dashboard supplier for the DashboardViewer.

Namespace: DevExpress.DashboardWin

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

Declaration

[DefaultValue(null)]
public object DashboardSource { get; set; }

Property Value

Type Default Description
Object

null

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.

    Assign the string containing the absolute or relative path to the dashboard XML file to the DashboardSource property…

    dashboardViewer1.DashboardSource = @"..\..\Data\Dashboard.xml";
    

    …or provide a dashboard XML file using a Uri class instance.

    dashboardViewer1.DashboardSource = new Uri(@"..\..\Data\Dashboard.xml", UriKind.Relative);
    
  2. Using a dashboard created at design time.

    Assign the type of this dashboard to the DashboardSource property…

    dashboardViewer1.DashboardSource = typeof(Dashboard1);
    

    …or use the string containing the dashboard class name.

    dashboardViewer1.DashboardSource = "WindowsFormsApplication1.Dashboard1";
    

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.

See Also