Back to Devexpress

DashboardTypeStorage Class

dashboard-devexpress-dot-dashboardweb-af1e7613.md

latest4.1 KB
Original Source

DashboardTypeStorage Class

A storage of dashboards created at design time within Visual Studio.

Namespace : DevExpress.DashboardWeb

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

NuGet Package : DevExpress.Web.Dashboard.Common

Declaration

csharp
public class DashboardTypeStorage :
    IEditableDashboardStorage,
    IDashboardStorage,
    IServiceDataConnectionParametersProvider,
    IServiceCustomParametersProvider
vb
Public Class DashboardTypeStorage
    Implements IEditableDashboardStorage,
               IDashboardStorage,
               IServiceDataConnectionParametersProvider,
               IServiceCustomParametersProvider

Remarks

To use the DashboardTypeStorage as dashboard storage, initialize it and pass the resulting object to the ASPxDashboard.SetDashboardStorage or DashboardConfigurator.SetDashboardStorage method.

Note

You can use DashboardTypeStorage only in the WorkingMode.ViewerOnly mode.

Example

The following code snippet shows how to create a DashboardTypeStorage, add two dashboards created at design time to this storage, and load a dashboard with the ‘Dashboard2’ type from this storage.

The dashboard id passed to the DashboardId property is a hyphenated name generated from the namespace and class that specifies the dashboard type.

csharp
using DevExpress.DashboardWeb;
// ...
namespace AspNetWebFormsDashboardTest {
    public partial class Default : System.Web.UI.Page {
        protected void Page_Load(object sender, EventArgs e)
        {
            ASPxDashboard1.WorkingMode = WorkingMode.ViewerOnly;
            DashboardTypeStorage typeStorage = new DashboardTypeStorage();
            typeStorage.RegisterDashboard(typeof(Dashboard1));
            typeStorage.RegisterDashboard(typeof(Dashboard2));
            ASPxDashboard1.SetDashboardStorage(typeStorage);
            ASPxDashboard1.DashboardId = "AspNetWebFormsDashboardTest-Dashboard2";
        }
    }
}
vb
Imports DevExpress.DashboardWeb
' ...
Namespace AspNetWebFormsDashboardTest
    Partial Public Class [Default]
        Inherits System.Web.UI.Page
        Protected Sub Page_Load(ByVal sender As Object, ByVal e As EventArgs)
            ASPxDashboard1.WorkingMode = WorkingMode.ViewerOnly
            Dim typeStorage As New DashboardTypeStorage()
            typeStorage.RegisterDashboard(GetType(Dashboard1))
            typeStorage.RegisterDashboard(GetType(Dashboard2))
            ASPxDashboard1.SetDashboardStorage(typeStorage)
            ASPxDashboard1.DashboardId = "AspNetWebFormsDashboardTest-Dashboard2"
        End Sub
    End Class
End Namespace

Implements

IEditableDashboardStorage

IDashboardStorage

Inheritance

Object DashboardTypeStorage

See Also

DashboardTypeStorage Members

DashboardType

DevExpress.DashboardWeb Namespace