DevExpress-Examples / mvc-dashboard-custom-storage

Create a custom dashboard storage to load and save dashboards in a database.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Dashboard for MVC - How to Load and Save Dashboards from/to a Database

This example shows how to create a custom dashboard storage to load and save dashboards in a database. To create custom dashboard storage, implement IDashboardStorage or IEditableDashboardStorage.

This example also contains an SQL file (SavedDashboards.sql). You can use it to recreate a database on your side. Update the connection string in the Web.config file to make it valid in your environment. The example uses the System.Data.SqlClient members to connect and manage an MS SQL server database.

The following API used in the example:

  • LoadDashboard 

    Loads a dashboard with the specified ID in XDocument format from storage.

  • GetAvailableDashboardsInfo 

    Returns a list of IDs and Captions of dashboards available in the data storage.

  • SaveDashboard 

    Saves the specified dashboard with new settings to the dashboard storage.

  • AddDashboard

    Saves a dashboard definition and its caption to the data storage and returns the ID of the new saved dashboard.

Files to Review

Documentation

More Examples

About

Create a custom dashboard storage to load and save dashboards in a database.

License:Other


Languages

Language:JavaScript 94.7%Language:Visual Basic .NET 2.3%Language:C# 2.1%Language:TSQL 0.5%Language:HTML 0.4%Language:ASP.NET 0.0%