-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathForm1.vb
27 lines (22 loc) · 906 Bytes
/
Form1.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 System.Data
Namespace DXApplication3
Public Partial Class Form1
Inherits DevExpress.XtraEditors.XtraForm
Public Sub New()
InitializeComponent()
customGrid1.DataSource = CreateTable(42)
customGridView1.OptionsSelection.MultiSelect = True
End Sub
Private Function CreateTable(ByVal RowCount As Integer) As DataTable
Dim tbl As DataTable = New DataTable()
tbl.Columns.Add("Name", GetType(String))
tbl.Columns.Add("ID", GetType(Integer))
tbl.Columns.Add("Number", GetType(Integer))
tbl.Columns.Add("Date", GetType(Date))
For i As Integer = 0 To RowCount - 1
tbl.Rows.Add(New Object() {String.Format("Name{0}", i), i, i Mod 4, Date.Now.AddDays(i)})
Next
Return tbl
End Function
End Class
End Namespace