-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathXpoDashboard.aspx.vb
27 lines (24 loc) · 1.45 KB
/
XpoDashboard.aspx.vb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
Imports DevExpress.DashboardCommon
Imports DevExpress.DashboardWeb
Imports System
Namespace WebFormsDashboardDataSources.Pages
Public Partial Class XpoDashboard
Inherits Web.UI.Page
Protected Sub Page_Load(ByVal sender As Object, ByVal e As EventArgs)
Dim dashboardFileStorage As DashboardFileStorage = New DashboardFileStorage("~/App_Data/Dashboards")
ASPxDashboardXpo.SetDashboardStorage(dashboardFileStorage)
' Uncomment the next line to allow users to create new data sources based on predefined connection strings.
'ASPxDashboardXpo.SetConnectionStringsProvider(new DevExpress.DataAccess.Web.ConfigFileConnectionStringsProvider());
' Create a data source storage.
Dim dataSourceStorage As DataSourceInMemoryStorage = New DataSourceInMemoryStorage()
' Register an XPO data source.
Dim xpoDataSource As DashboardXpoDataSource = New DashboardXpoDataSource("XPO Data Source")
xpoDataSource.ConnectionStringName = "NWindConnectionStringSQLite"
xpoDataSource.SetEntityType(GetType(Category))
dataSourceStorage.RegisterDataSource("xpoDataSource", xpoDataSource.SaveToXml())
' Set the configured data source storage.
ASPxDashboardXpo.SetDataSourceStorage(dataSourceStorage)
ASPxDashboardXpo.InitialDashboardId = "dashboardXpo"
End Sub
End Class
End Namespace