Skip to main content
All docs
V18.2

DashboardSourceModel.DashboardSource Property

Gets or sets a dashboard supplier for the DashboardViewer.

Namespace: DevExpress.DashboardWeb.Mvc

Assembly: DevExpress.Dashboard.v18.2.Web.Mvc5.dll

Declaration

public object DashboardSource { get; set; }

Property Value

Type Description
Object

A Object value specifying a dashboard supplier for the DashboardViewer.

Remarks

There are two ways to provide a dashboard to be opened in the MVC Viewer 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.

    dashboardSourceModel.DashboardSource = @"App_Data/Dashboard.xml";
    
  2. Using a dashboard created at design time.

    Assign the type of this dashboard to the DashboardSource property…

    dashboardSourceModel.DashboardSource = typeof(Dashboard1);
    

    …or use the string containing the dashboard class name.

    dashboardSourceModel.DashboardSource = "WebApplication1.Dashboard1";
    

    Important

    Note that specifying the dashboard source using the string containing the dashboard class name is not supported at the Medium Trust permission level.

If necessary, you can load a dashboard at runtime. To do this, assign an identifier to the DashboardSourceModel.DashboardId property and then specify the DashboardSourceModel.DashboardLoading property. Note that the DashboardSource property is ignored in this case.

The following code snippet (auto-collected from DevExpress Examples) contains a reference 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