Skip to content

DevExpress-Examples/asp-net-core-dashboard-custom-panel

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

BI Dashboard for ASP.NET Core - How to Implement a Custom Service and UI for Managing Dashboards List

This example shows how to create a custom list of dashboards similar to the Dashboard Panel.

The DevExtreme ASP.NET Data package's API is used to prepare a list of dashboard names with their IDs. Identifiers are based on the Products table from the Northwind database and accessed through the Entity Framework Core. The DashboardPanelController.Dashboards action method call returns this list.

You need to implement the custom dashboard storage to store dashboards. Call the IDashboardStorage.LoadDashboard method to return the corresponding dashboard from this storage. This example uses a single dashboard XML template (the DashboardTemplate.xml file) and only modifies the dashboard's title to emulate different dashboards. In this particular usage scenario, you can store dashboard layouts in the database and load them from here (for example, see Dashboard for ASP.NET Core - How to load and save dashboards from/to a database).

The List control is used to load and display the list of dashboards. The searchEnabled option of this control is enabled to allow search. You can use other widget options to enable the required functionality. For example, the itemDragging.allowReordering option allows end users to reorder items (see Item Drag & Drop).

NOTE: This example uses the ProductID database field as a dashboard's ID. The field's type is number while the DashboardInfo.ID property and the IDashboardStorage.LoadDashboard method's argument type is string. It is necessary to convert types. In this example, this is done in the NorthwindContext.OnModelCreating method (see NorthwindContext.cs).

Files to Review

Documentation

More Examples