LookupGrid: Fix error causing multiple entries in lookup control
This commit is contained in:
parent
96f3ece84e
commit
383c1ce301
@ -233,11 +233,13 @@ Public Class RepositoryItemLookupControl3
|
|||||||
If oForm.NewValues.Count > 0 AndAlso TypeOf DataSource Is DataTable Then
|
If oForm.NewValues.Count > 0 AndAlso TypeOf DataSource Is DataTable Then
|
||||||
Dim oTable As DataTable = DirectCast(DataSource, DataTable)
|
Dim oTable As DataTable = DirectCast(DataSource, DataTable)
|
||||||
|
|
||||||
For Each oValue In oForm.NewValues
|
If oTable.TableName <> NAME_DATATABLE_INTERNAL Then
|
||||||
Dim oRow = oTable.NewRow()
|
For Each oValue In oForm.NewValues
|
||||||
oRow.Item(0) = oValue
|
Dim oRow = oTable.NewRow()
|
||||||
oTable.Rows.Add(oRow)
|
oRow.Item(0) = oValue
|
||||||
Next
|
oTable.Rows.Add(oRow)
|
||||||
|
Next
|
||||||
|
End If
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
End Using
|
End Using
|
||||||
|
|||||||
@ -9,18 +9,22 @@ Public Class frmLookup
|
|||||||
|
|
||||||
Dim LookupControl31 As New LookupControl3 With {
|
Dim LookupControl31 As New LookupControl3 With {
|
||||||
.Location = New Point(10, 10),
|
.Location = New Point(10, 10),
|
||||||
.Size = New Drawing.Size(100, 27)
|
.Size = New Size(300, 27)
|
||||||
}
|
}
|
||||||
Dim LookupControl32 As New LookupControl3 With {
|
Dim LookupControl32 As New LookupControl3 With {
|
||||||
.Location = New Point(10, 60),
|
.Location = New Point(10, 60),
|
||||||
.Size = New Drawing.Size(100, 27)
|
.Size = New Size(300, 27)
|
||||||
}
|
}
|
||||||
Dim LookupControl33 As New LookupControl3 With {
|
Dim LookupControl33 As New LookupControl3 With {
|
||||||
.Location = New Point(10, 110),
|
.Location = New Point(10, 110),
|
||||||
.Size = New Drawing.Size(100, 27)
|
.Size = New Size(300, 27)
|
||||||
|
}
|
||||||
|
Dim LookupControl34 As New LookupControl3 With {
|
||||||
|
.Location = New Point(10, 160),
|
||||||
|
.Size = New Size(300, 27)
|
||||||
}
|
}
|
||||||
|
|
||||||
Controls.AddRange({LookupControl31, LookupControl32, LookupControl33})
|
Controls.AddRange({LookupControl31, LookupControl32, LookupControl33, LookupControl34})
|
||||||
|
|
||||||
LookupControl31.Properties.DataSource = oTable
|
LookupControl31.Properties.DataSource = oTable
|
||||||
|
|
||||||
@ -29,10 +33,12 @@ Public Class frmLookup
|
|||||||
LookupControl32.Properties.ValueMember = "Col1"
|
LookupControl32.Properties.ValueMember = "Col1"
|
||||||
LookupControl32.Properties.DataSource = oTable
|
LookupControl32.Properties.DataSource = oTable
|
||||||
|
|
||||||
|
|
||||||
LookupControl33.Properties.AllowAddNewValues = True
|
LookupControl33.Properties.AllowAddNewValues = True
|
||||||
LookupControl33.Properties.MultiSelect = True
|
LookupControl33.Properties.MultiSelect = True
|
||||||
LookupControl33.Properties.DataSource = oTable
|
LookupControl33.Properties.DataSource = oTable
|
||||||
|
|
||||||
|
LookupControl34.Properties.AllowAddNewValues = True
|
||||||
|
LookupControl34.Properties.MultiSelect = True
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Private Function GetDatatable(Limit As Integer) As DataTable
|
Private Function GetDatatable(Limit As Integer) As DataTable
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user