LookupGrid: Update Datasource when new value is added

This commit is contained in:
Jonathan Jenne
2021-04-07 12:28:40 +02:00
parent 2450977fc3
commit 11908ab246
2 changed files with 32 additions and 8 deletions

View File

@@ -229,6 +229,16 @@ Public Class RepositoryItemLookupControl3
If oResult = Windows.Forms.DialogResult.OK Then
Dim oValues = oForm.SelectedValues
UpdateSelectedValues(oValues)
If oForm.NewValues.Count > 0 AndAlso TypeOf DataSource Is DataTable Then
Dim oTable As DataTable = DirectCast(DataSource, DataTable)
For Each oValue In oForm.NewValues
Dim oRow = oTable.NewRow()
oRow.Item(0) = oValue
oTable.Rows.Add(oRow)
Next
End If
End If
End Using
End If