-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathDefault.aspx.vb
32 lines (29 loc) · 971 Bytes
/
Default.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
28
29
30
31
32
Imports System
Imports DevExpress.Web.ASPxPivotGrid
Imports DevExpress.XtraPivotGrid
Imports System.Data
Partial Public Class _Default
Inherits System.Web.UI.Page
Protected Sub Page_Load(ByVal sender As Object, ByVal e As EventArgs)
ASPxPivotGrid1.DataSource = GetData()
End Sub
Private Function GetData() As DataTable
Dim dt As New DataTable()
Dim rnd As New Random()
dt.Columns.Add("RowGroup", GetType(String))
dt.Columns.Add("Row", GetType(String))
dt.Columns.Add("ColumnGroup", GetType(String))
dt.Columns.Add("Column", GetType(String))
dt.Columns.Add("Data", GetType(Integer))
For rowGroup As Integer = 1 To 4
For row As Integer = 1 To 4
For columnGroup As Integer = 1 To 4
For column As Integer = 1 To 4
dt.Rows.Add("Row Group" & rowGroup, "Row" & row, "Column Group" & columnGroup, "Column" & column, rnd.Next(100))
Next column
Next columnGroup
Next row
Next rowGroup
Return dt
End Function
End Class