DashboardTypeStorage Class
A storage of dashboards created at design time within Visual Studio.
Namespace: DevExpress.DashboardWeb
Assembly: DevExpress.Dashboard.v24.1.Web.dll
NuGet Package: DevExpress.Web.Dashboard.Common
Declaration
public class DashboardTypeStorage :
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.
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";
}
}
}