36 lines
1.1 KiB
VB.net
36 lines
1.1 KiB
VB.net
Imports DigitalData.Controls.LookupGrid
|
|
|
|
Public Class frmLookup
|
|
Private _Datasource As List(Of String) = New List(Of String)
|
|
|
|
Private Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load
|
|
For index = 1 To 1000000
|
|
_Datasource.Add($"item-{index}")
|
|
Next
|
|
|
|
LookupControl31.Properties.DataSource = GetDatatable(10)
|
|
|
|
Dim oEditor As New LookupControl3
|
|
GridControl1.DataSource = New List(Of String) From {"foo", "var"}
|
|
End Sub
|
|
|
|
Private Function GetDatatable(Limit As Integer) As DataTable
|
|
Dim oDatatable As New DataTable
|
|
Dim oColumns As New List(Of DataColumn) From {
|
|
New DataColumn("Col1", GetType(String)),
|
|
New DataColumn("Col2", GetType(String))
|
|
}
|
|
|
|
oDatatable.Columns.AddRange(oColumns.ToArray)
|
|
|
|
For Each Item In _Datasource.Take(Limit)
|
|
Dim oRow = oDatatable.NewRow()
|
|
oRow.Item("Col1") = Item
|
|
oRow.Item("Col2") = Item & "_" & "SomeLong Random(String) !!!111einself"
|
|
oDatatable.Rows.Add(oRow)
|
|
Next
|
|
|
|
Return oDatatable
|
|
End Function
|
|
End Class
|