jj: load combobox index values, no findstringexact

This commit is contained in:
Jonathan Jenne 2018-06-14 14:18:03 +02:00
parent 4c7092ec8d
commit 37cdf2a1ff

View File

@ -1770,15 +1770,32 @@ Public Class frmValidator
Else
wertWD = aktivesDokument.GetVariableValue(idxname)
End If
If wertWD Is Nothing Then
If LogErrorsOnly = False Then ClassLogger.Add($" >> Indexwert aus index {idxname}: Nothing", False)
If defaultValue = String.Empty Then
If LogErrorsOnly = False Then ClassLogger.Add($" >> Indexwert-defaultValue wurde nicht gefunden", False)
cmb.SelectedIndex = -1
Else
If LogErrorsOnly = False Then ClassLogger.Add($" >> Indexwert-defaultValue wird geladen", False)
cmb.Text = defaultValue
'cmb.SelectedIndex = cmb.FindStringExact(defaultValue)
End If
Else
cmb.SelectedIndex = cmb.FindStringExact(wertWD)
If LogErrorsOnly = False Then ClassLogger.Add($" >> Indexwert aus index {idxname}: {wertWD}", False)
If LogErrorsOnly = False Then ClassLogger.Add($" >> Items in Combobox: {cmb.Items.Count}", False)
If LogErrorsOnly = False Then ClassLogger.Add($" >> Index Wert wurde gesetzt", False)
cmb.Text = wertWD
'If cmb.Items.Count = 0 Then
' If LogErrorsOnly = False Then ClassLogger.Add($" >> Index Wert wurde gesetzt", False)
' cmb.Text = wertWD
'Else
' If LogErrorsOnly = False Then ClassLogger.Add($" >> Index Wert wurde ausgewählt", False)
' cmb.SelectedIndex = cmb.FindStringExact(wertWD)
'End If
End If
End If
Case "System.Windows.Forms.DataGridView"