Skip to main content

IDashboardStorage Interface

Custom storage of dashboards.

Namespace: DevExpress.DashboardWeb

Assembly: DevExpress.Dashboard.v22.1.Web.dll

Declaration

public interface IDashboardStorage

Remarks

Use the DashboardConfigurator.SetDashboardStorage method to create a storage for dashboards. You can use predefined dashboard storages (DashboardFileStorage or DashboardInMemoryStorage) or you can implement the IDashboardStorage/IEditableDashboardStorage interface to provide your logic to manage dashboards. Review the following topic for more information: Manage Multi-Tenancy.

Note

The DashboardInMemoryStorage is used if you do not create the dashboard storage.

Example

The following example shows how to create a custom dashboard storage for ASPxDashboard by implementing the IEditableDashboardStorage interface. In this example, a DataSet is used as an in-memory storage of dashboards. This DataSet can be used later to save dashboards in the database using DataAdapter.

View Example

using System;
using System.Collections.Generic;
using System.Data;
using System.Linq;
using System.Web;

namespace WebDesigner_CustomDashboardStorage
{
    public class DashboardStorageDataSet: DataSet
    {
        public DashboardStorageDataSet()
        {
            DataTable table = new DataTable("Dashboards");
            DataColumn idColumn = new DataColumn("DashboardID", typeof(Int32));
            idColumn.AutoIncrement = true;
            idColumn.AutoIncrementSeed = 1;
            idColumn.Unique = true;
            idColumn.AllowDBNull = false;
            table.Columns.Add(idColumn);
            table.Columns.Add("DashboardXml", typeof(string));
            table.Columns.Add("DashboardName", typeof(string));
            table.PrimaryKey = new DataColumn[] {idColumn};
            this.Tables.Add(table);
        }
    }
}

The following code snippets (auto-collected from DevExpress Examples) contain references to the IDashboardStorage interface.

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