LookupControl: Fix empty popup when datasource is empty but allownewvalues is true

This commit is contained in:
Jonathan Jenne 2021-04-06 13:19:02 +02:00
parent a756c51f34
commit 6508ff742a

View File

@ -163,7 +163,19 @@ Public Class RepositoryItemLookupControl3
End Select
Else
NullText = Values.FirstOrDefault()
'OwnerEdit.EditValue = Values.FirstOrDefault()
End If
If DataSource Is Nothing Then
Dim oDataTable As New DataTable()
oDataTable.Columns.Add(New DataColumn("Data", GetType(String)))
For Each oValue In Values
Dim oRow = oDataTable.NewRow()
oRow.Item(0) = oValue
oDataTable.Rows.Add(oRow)
Next
DataSource = oDataTable
End If
_SelectedValues = Values