Back to Devexpress

IDashboardStorage.GetAvailableDashboardsInfo() Method

dashboard-devexpress-dot-dashboardweb-dot-idashboardstorage.md

latest4.3 KB
Original Source

IDashboardStorage.GetAvailableDashboardsInfo() Method

Gets information about dashboards stored in the current IDashboardStorage.

Namespace : DevExpress.DashboardWeb

Assembly : DevExpress.Dashboard.v25.2.Web.dll

NuGet Package : DevExpress.Web.Dashboard.Common

Declaration

csharp
IEnumerable<DashboardInfo> GetAvailableDashboardsInfo()
vb
Function GetAvailableDashboardsInfo As IEnumerable(Of DashboardInfo)

Returns

TypeDescription
IEnumerable<DashboardInfo>

A collection of DashboardInfo objects that contain information about dashboards stored in the current IDashboardStorage.

|

Remarks

The code snippet below shows how to get info about dashboards located in the dashboard file storage.

csharp
IDashboardStorage storage = new DashboardFileStorage("App_Data\\Dashboards");
var dashboardList = storage.GetAvailableDashboardsInfo();

The following examples are based on different platforms and show how to create a custom dashboard storage to load and save dashboards to a database:

View Example: ASP.NET CoreView Example: ASP.NET MVCView Example: ASP.NET Web Forms

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

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.

mvc-dashboard-download-dashboard-xml-definition/CS/Controllers/HomeController.cs#L27

csharp
if(string.IsNullOrEmpty(dashboardId)) {
    IEnumerable<DashboardInfo> dashboards = st.GetAvailableDashboardsInfo();
    dashboardId = ((DashboardInfo)dashboards.ElementAt(0)).ID;

web-forms-dashboard-implement-server-side-export/CS/ASPxDashboard_ServerExport/Default.aspx.cs#L18

csharp
List<string> dashboardIDs = new List<string>();
foreach (DashboardInfo dashboardInfo in ((IDashboardStorage)fileStorage).GetAvailableDashboardsInfo()) {
    dashboardIDs.Add(dashboardInfo.ID);

web-forms-dashboard-implement-server-side-export/VB/ASPxDashboard_ServerExport/Default.aspx.vb#L21

vb
Dim dashboardIDs As List(Of String) = New List(Of String)()
For Each dashboardInfo As DashboardInfo In CType(fileStorage, IDashboardStorage).GetAvailableDashboardsInfo()
    dashboardIDs.Add(dashboardInfo.ID)

See Also

IDashboardStorage Interface

IDashboardStorage Members

DevExpress.DashboardWeb Namespace