Skip to content

Commit ac33dfd

Browse files
author
Natalia Kazakova (DevExpress)
committed
add VB
1 parent 2457277 commit ac33dfd

File tree

347 files changed

+655777
-5
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

347 files changed

+655777
-5
lines changed
0 Bytes
Binary file not shown.
0 Bytes
Binary file not shown.
Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,11 @@
11
@{
22
ViewBag.Title = "Home Page";
33
}
4-
5-
@Html.DevExpress().Dashboard(settings => {
6-
settings.Name = "Dashboard";
7-
settings.ControllerName = "DefaultDashboard";
8-
}).GetHtml()
4+
<div style="position:absolute; top: 0; bottom: 0; right: 0; left: 0">
5+
@Html.DevExpress().Dashboard(settings => {
6+
settings.Name = "Dashboard";
7+
settings.ControllerName = "DefaultDashboard";
8+
settings.Width = Unit.Percentage(100);
9+
settings.Height = Unit.Percentage(100);
10+
}).GetHtml()
11+
</div>
0 Bytes
Binary file not shown.

VB/MvcCustomController.sln

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
2+
Microsoft Visual Studio Solution File, Format Version 12.00
3+
# Visual Studio Version 16
4+
VisualStudioVersion = 16.0.31624.102
5+
MinimumVisualStudioVersion = 10.0.40219.1
6+
Project("{F184B08F-C81C-45F6-A57F-5ABD9991F28F}") = "MvcCustomController", "MvcCustomController\MvcCustomController.vbproj", "{F1B9C1F9-2BBC-4AF8-8246-631A56AC966E}"
7+
EndProject
8+
Global
9+
GlobalSection(SolutionConfigurationPlatforms) = preSolution
10+
Debug|Any CPU = Debug|Any CPU
11+
Release|Any CPU = Release|Any CPU
12+
EndGlobalSection
13+
GlobalSection(ProjectConfigurationPlatforms) = postSolution
14+
{F1B9C1F9-2BBC-4AF8-8246-631A56AC966E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
15+
{F1B9C1F9-2BBC-4AF8-8246-631A56AC966E}.Debug|Any CPU.Build.0 = Debug|Any CPU
16+
{F1B9C1F9-2BBC-4AF8-8246-631A56AC966E}.Release|Any CPU.ActiveCfg = Release|Any CPU
17+
{F1B9C1F9-2BBC-4AF8-8246-631A56AC966E}.Release|Any CPU.Build.0 = Release|Any CPU
18+
EndGlobalSection
19+
GlobalSection(SolutionProperties) = preSolution
20+
HideSolutionNode = FALSE
21+
EndGlobalSection
22+
GlobalSection(ExtensibilityGlobals) = postSolution
23+
SolutionGuid = {7E9AF851-A7AA-4639-8FEF-9A14E51BCD8E}
24+
EndGlobalSection
25+
EndGlobal
Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<Dashboard>
3+
<Title Text="Sample Dashboard" />
4+
<DataSources>
5+
<SqlDataSource Name="SalesPerson" ComponentName="DataSource1">
6+
<Connection Name="NWindConnectionString" FromAppConfig="true" />
7+
<Query Type="SelectQuery" Name="SalesPerson">
8+
<Tables>
9+
<Table Name="SalesPerson" />
10+
</Tables>
11+
<Columns>
12+
<AllColumns Table="SalesPerson" />
13+
</Columns>
14+
</Query>
15+
<ConnectionOptions CloseConnection="true" />
16+
</SqlDataSource>
17+
</DataSources>
18+
<Items>
19+
<Chart ComponentName="chartDashboardItem1" Name="Chart 1" DataSource="DataSource1" DataMember="SalesPerson">
20+
<DataItems>
21+
<Measure DataMember="Extended Price" DefaultId="DataItem0" />
22+
<Dimension DataMember="CategoryName" DefaultId="DataItem1" />
23+
<Dimension DataMember="Country" DefaultId="DataItem2" />
24+
</DataItems>
25+
<SeriesDimensions>
26+
<SeriesDimension DefaultId="DataItem2" />
27+
</SeriesDimensions>
28+
<Arguments>
29+
<Argument DefaultId="DataItem1" />
30+
</Arguments>
31+
<Panes>
32+
<Pane Name="Pane 1">
33+
<Series>
34+
<Simple>
35+
<Value DefaultId="DataItem0" />
36+
</Simple>
37+
</Series>
38+
</Pane>
39+
</Panes>
40+
</Chart>
41+
<ListBox ComponentName="listBoxDashboardItem1" Name="List Box 1" DataSource="DataSource1" DataMember="SalesPerson">
42+
<DataItems>
43+
<Dimension DataMember="CategoryName" DefaultId="DataItem0" />
44+
</DataItems>
45+
<FilterDimensions>
46+
<Dimension DefaultId="DataItem0" />
47+
</FilterDimensions>
48+
</ListBox>
49+
</Items>
50+
<LayoutTree>
51+
<LayoutGroup Weight="100">
52+
<LayoutItem DashboardItem="listBoxDashboardItem1" Weight="39.797632504395878" />
53+
<LayoutItem DashboardItem="chartDashboardItem1" Weight="160.20236749560411" />
54+
</LayoutGroup>
55+
</LayoutTree>
56+
</Dashboard>
5.44 MB
Binary file not shown.
3.38 MB
Binary file not shown.
244 KB
Binary file not shown.
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
Imports System.Web.Hosting
2+
Imports DevExpress.DashboardCommon
3+
Imports DevExpress.DashboardWeb
4+
Imports DevExpress.DashboardWeb.Mvc
5+
Imports DevExpress.DataAccess.Excel
6+
Imports DevExpress.DataAccess.Sql
7+
8+
Public Class DashboardConfig
9+
Public Shared Sub RegisterService(routes As RouteCollection)
10+
routes.MapDashboardRoute("dashboardControl", "DefaultDashboard")
11+
12+
Dim dashboardFileStorage As New DashboardFileStorage("~/App_Data/Dashboards")
13+
DashboardConfigurator.Default.SetDashboardStorage(dashboardFileStorage)
14+
15+
' Uncomment this string to allow end users to create new data sources based on predefined connection strings.
16+
'DashboardConfigurator.Default.SetConnectionStringsProvider(new DevExpress.DataAccess.Web.ConfigFileConnectionStringsProvider());
17+
18+
Dim dataSourceStorage As New DataSourceInMemoryStorage()
19+
20+
' Registers an SQL data source.
21+
Dim sqlDataSource As New DashboardSqlDataSource("SQL Data Source", "NWindConnectionString")
22+
Dim query As SelectQuery = SelectQueryFluentBuilder.AddTable("SalesPerson").SelectAllColumns().Build("Sales Person")
23+
sqlDataSource.Queries.Add(query)
24+
dataSourceStorage.RegisterDataSource("sqlDataSource", sqlDataSource.SaveToXml())
25+
26+
' Registers an Excel data source.
27+
Dim excelDataSource As New DashboardExcelDataSource("Excel Data Source")
28+
excelDataSource.FileName = HostingEnvironment.MapPath("~/App_Data/Sales.xlsx")
29+
excelDataSource.SourceOptions = New ExcelSourceOptions(New ExcelWorksheetSettings("Sheet1"))
30+
dataSourceStorage.RegisterDataSource("excelDataSource", excelDataSource.SaveToXml())
31+
32+
DashboardConfigurator.Default.SetDataSourceStorage(dataSourceStorage)
33+
End Sub
34+
End Class

0 commit comments

Comments
 (0)