Move to LookupControl3 for Globix
This commit is contained in:
@@ -67,10 +67,7 @@ Public Class GlobixControls
|
||||
Try
|
||||
Dim oSql As String = sql_Vorschlag
|
||||
Dim oConnectionString As String
|
||||
Dim oControl As New DigitalData.Controls.LookupGrid.LookupControl2 With {
|
||||
.Multiselect = Multiselect,
|
||||
.AllowAddNewValues = AddNewValues,
|
||||
.PreventDuplicates = PreventDuplicateValues,
|
||||
Dim oControl As New LookupControl3 With {
|
||||
.Location = New Point(11, y),
|
||||
.Size = New Size(300, 27),
|
||||
.Name = "cmbMulti" & indexname,
|
||||
@@ -79,6 +76,10 @@ Public Class GlobixControls
|
||||
.IndexType = DataType
|
||||
}
|
||||
}
|
||||
|
||||
oControl.Properties.MultiSelect = Multiselect
|
||||
oControl.Properties.AllowAddNewValues = AddNewValues
|
||||
oControl.Properties.PreventDuplicates = PreventDuplicateValues
|
||||
oControl.Properties.AppearanceFocused.BackColor = Color.LightGray
|
||||
|
||||
If Not String.IsNullOrEmpty(Vorgabe) Then
|
||||
@@ -95,10 +96,10 @@ Public Class GlobixControls
|
||||
Select(Function(item) item.Trim()).
|
||||
ToList()
|
||||
End If
|
||||
oControl.SelectedValues = oDefaultValues
|
||||
oControl.Properties.SelectedValues = oDefaultValues
|
||||
End If
|
||||
|
||||
AddHandler oControl.SelectedValuesChanged, AddressOf Lookup_SelectedValuesChanged
|
||||
AddHandler oControl.Properties.SelectedValuesChanged, AddressOf Lookup_SelectedValuesChanged
|
||||
|
||||
oConnectionString = My.Database.Get_ConnectionStringforID(conid)
|
||||
|
||||
@@ -109,7 +110,7 @@ Public Class GlobixControls
|
||||
_Logger.Debug("sql enthält Platzhalter und wird erst während der Laufzeit gefüllt!", False)
|
||||
Else
|
||||
Dim oDatatable = My.Database.GetDatatableWithConnection(oSql, oConnectionString)
|
||||
oControl.DataSource = oDatatable
|
||||
oControl.Properties.DataSource = oDatatable
|
||||
End If
|
||||
Else
|
||||
_Logger.Warn("Connection String for control [{0}] is empty!", oControl.Name)
|
||||
@@ -124,7 +125,7 @@ Public Class GlobixControls
|
||||
End Try
|
||||
End Function
|
||||
|
||||
Private Sub Lookup_SelectedValuesChanged(sender As LookupControl2, SelectedValues As List(Of String))
|
||||
Private Sub Lookup_SelectedValuesChanged(sender As LookupControl3, SelectedValues As List(Of String))
|
||||
PrepareDependingControl(sender)
|
||||
End Sub
|
||||
|
||||
@@ -476,9 +477,9 @@ Public Class GlobixControls
|
||||
DirectCast(oFoundControl, DevExpress.XtraEditors.TextEdit).Text = oValue
|
||||
End If
|
||||
End If
|
||||
Case GetType(LookupControl2).Name
|
||||
Case GetType(LookupControl3).Name
|
||||
_Logger.Debug("Setting Value for LookupControl [{0}]: [{1}]", oFoundControl.Name, "DATATABLE")
|
||||
DirectCast(oFoundControl, LookupControl2).DataSource = oDatatable
|
||||
DirectCast(oFoundControl, LookupControl3).Properties.DataSource = oDatatable
|
||||
Case GetType(ComboBox).Name
|
||||
_Logger.Debug("Setting Value for Combobox [{0}]: [{1}]", oFoundControl.Name, "DATATABLE")
|
||||
DirectCast(oFoundControl, ComboBox).DataSource = oDatatable
|
||||
|
||||
Reference in New Issue
Block a user