LookupGrid: Add ReadOnly option

This commit is contained in:
Jonathan Jenne
2019-04-30 14:36:56 +02:00
parent ecdf35f6fe
commit 10f87536df
2 changed files with 164 additions and 152 deletions

View File

@@ -1,7 +1,4 @@
Public Class Form1
Public Class Form1
Private _Datasource As New List(Of String) From {"Foo", "bar", "baz", "quux"}
Private Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load
@@ -11,6 +8,7 @@ Public Class Form1
LookupControl.DataSource = oDatatable
LookupControl.SelectedValues = oSelectedValues
LookupControl.ReadOnly = True
End Sub
Private Function GetDatatable() As DataTable
@@ -27,11 +25,10 @@ Public Class Form1
oDatatable.Rows.Add(oRow)
Next
Return oDatatable
End Function
Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
MsgBox(LookupControl.SelectedValues.Count)
LookupControl.ReadOnly = Not LookupControl.ReadOnly
End Sub
End Class