-
Notifications
You must be signed in to change notification settings - Fork 2
/
Default.aspx.vb
32 lines (28 loc) · 954 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 System.Data
Imports System.Web.UI
Imports System.Web.UI.WebControls
Imports System.Web.UI.WebControls.WebParts
Imports System.Web.UI.HtmlControls
Imports DevExpress.Web
Namespace GridRuntime
Public Partial Class _Default
Inherits Page
Protected Sub Page_Init(ByVal sender As Object, ByVal e As EventArgs)
Dim grid As ASPxGridView = New ASPxGridView()
grid.ID = "grid"
grid.KeyFieldName = "ID"
grid.DataSource = GetData()
form1.Controls.Add(grid)
grid.DataBind()
End Sub
Public Function GetData() As DataTable
Dim Table As DataTable = New DataTable()
Table.Columns.Add("ID", GetType(Integer))
Table.Columns.Add("ItemName", GetType(String))
Table.Rows.Add(1, "A")
Table.Rows.Add(2, "B")
Return Table
End Function
End Class
End Namespace