MS_18042016
This commit is contained in:
@@ -106,6 +106,7 @@ Public Class ClassControlBuilder
|
||||
Dim CONTROL_ID
|
||||
Public Sub OnComboBoxValueChanged(sender As Object, ByVal e As EventArgs)
|
||||
If CURRENT_RECORD_ENABLED = False Then Exit Sub
|
||||
|
||||
Try
|
||||
Dim control As Control = DirectCast(sender, Control)
|
||||
Dim controlId As Integer = DirectCast(control.Tag, ClassControlMetadata).Id
|
||||
@@ -1559,12 +1560,29 @@ Public Class ClassControlBuilder
|
||||
If DT_ListBox Is Nothing = False Then
|
||||
If DT_ListBox.Rows.Count > 0 Then
|
||||
control.DataSource = DT_ListBox
|
||||
control.DisplayMember = DT_ListBox.Columns(1).ColumnName
|
||||
control.ValueMember = DT_ListBox.Columns(0).ColumnName
|
||||
If DT_ListBox.Columns.Count = 1 Then
|
||||
control.DisplayMember = DT_ListBox.Columns(0).ColumnName
|
||||
control.ValueMember = DT_ListBox.Columns(0).ColumnName
|
||||
Else
|
||||
Try
|
||||
control.ValueMember = DT_ListBox.Columns(0).ColumnName
|
||||
control.DisplayMember = DT_ListBox.Columns(1).ColumnName
|
||||
Catch ex As Exception
|
||||
Dim colstring = ""
|
||||
For Each Col As DataColumn In DT_ListBox.Columns
|
||||
colstring = colstring & ";" & Col.ColumnName
|
||||
Next
|
||||
ClassLogger.Add("Error in Binding CheckedListBox: " & ex.Message & " - Columns: " & colstring)
|
||||
control.DisplayMember = DT_ListBox.Columns(0).ColumnName
|
||||
End Try
|
||||
End If
|
||||
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
'Bei clicken checken
|
||||
control.CheckOnClick = True
|
||||
|
||||
' Wenn statische liste vorhanden, werte splitten und einfügen
|
||||
If static_list.Length > 0 Then
|
||||
@@ -1584,6 +1602,7 @@ Public Class ClassControlBuilder
|
||||
Me.AddToPanel(control)
|
||||
End If
|
||||
Catch ex As Exception
|
||||
ClassLogger.Add("Unexpected Error in AddCheckedListBox: " & ex.Message)
|
||||
MsgBox("Error in AddCheckedListBox: " + vbNewLine + ex.Message)
|
||||
End Try
|
||||
End Sub
|
||||
|
||||
Reference in New Issue
Block a user