DashboardSourceModel.DashboardSource Property

Gets or sets a dashboard supplier for the DashboardViewer.

Namespace: DevExpress.DashboardWeb.Mvc

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


public object DashboardSource { get; set; }
Public Property DashboardSource As Object

Property Value

Type Description

A Object value specifying a dashboard supplier for the DashboardViewer.


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";

    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.

See Also