LookupControl: Fix empty popup when datasource is empty but allownewvalues is true
This commit is contained in:
parent
a756c51f34
commit
6508ff742a
@ -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
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user