work on resultlists

This commit is contained in:
Developer02 Digital Data
2019-10-16 17:09:40 +02:00
parent c3379adb54
commit 1047f6152a
11 changed files with 186 additions and 17 deletions

View File

@@ -1,8 +1,12 @@
Public Class Form1
Private _Datasource As New List(Of String) From {"Foo", "bar", "baz", "quux"}
Private _Datasource As New List(Of String)
Private Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load
Dim oDatatable = GetDatatable()
For index = 1 To 1000000
_Datasource.Add($"item-{index}")
Next
Dim oDatatable = GetDatatable(10)
Dim oSelectedValues = _Datasource.Take(1).ToList()
LookupControl.DataSource = oDatatable
@@ -20,6 +24,8 @@
LookupControl22.SelectedValues = New List(Of String) From {"", Nothing, "LOL", "Foo"}
LookupControl23.DataSource = GetDatatable(100000)
AddHandler LookupControl.SelectedValuesChanged, Sub(_sender As Object, SelectedValues As List(Of String))
MsgBox("Selected Values: " & String.Join(",", SelectedValues.ToArray))
End Sub
@@ -33,7 +39,7 @@
End Sub
End Sub
Private Function GetDatatable() As DataTable
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)),
@@ -42,7 +48,7 @@
oDatatable.Columns.AddRange(oColumns.ToArray)
For Each Item In _Datasource
For Each Item In _Datasource.Take(Limit)
Dim oRow = oDatatable.NewRow()
oRow.Item("Col1") = Item
oRow.Item("Col2") = Item & "_" & "SomeLong Random(String) !!!111einself"