Skip to content

This example shows how to create a custom dashboard storage to load and save dashboards in a database.

License

Notifications You must be signed in to change notification settings

DevExpress-Examples/web-forms-dashboard-save-dashboards-to-database

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

32 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Dashboard for Web Forms - 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.

Files to Look At

Example Overview

The example uses the System.Data.SqlClient members to connect and manage an MS SQL server database.

A custom dashboard storage should implement one of the following interfaces: IDashboardStorage or IEditableDashboardStorage.

The following API is 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.

Additionally, this example contains an SQL file (SavedDashboards.sql) that can be used to recreate a database used in this example. Update the connection string in the Web.config file to make it valid in your environment.

Documentation

More Examples

About

This example shows how to create a custom dashboard storage to load and save dashboards in a database.

Topics

Resources

License

Stars

Watchers

Forks

Contributors 7