Optimierungen und Logging-Verbesserungen
GridView-Zustandsverwaltung: - Hinzufügen von Methoden zur Speicherung und Wiederherstellung des Grid-Zustands (`SaveGridStateForRestore`, `RestoreGridStateAfterValidation`). - Neue Debug-Logs zur Nachverfolgung von Gruppen- und Zeilenfokus. Validierungs- und Fehlerbehandlung: - Neue Event-Handler für Validierungsfehler (`GridView_ValidatingEditor_LogLookup`, `GridView_InvalidValueException_LogLookup`). - Verbesserte Behandlung von ungültigen Werten in ComboBoxen. Protokollierungsreduzierung: - Debug-Logs in Datenbankmodulen (`Firebird`, `MSSQLServer`, `ODBC`, `DatabaseWithFallback`) auskommentiert oder durch Warnungen ersetzt. Projektkonfiguration: - Unterstützung für mehrere Plattformen durch Hinzufügen von `RuntimeIdentifiers` in Projektdateien. Versionierung: - Aktualisierung der Assembly-Versionen in `Modules.Database` und `EDMIAPI`.
This commit is contained in:
@@ -607,16 +607,17 @@ Public Class ClassControlCreator
|
|||||||
oView.OptionsSelection.MultiSelect = True
|
oView.OptionsSelection.MultiSelect = True
|
||||||
oView.OptionsClipboard.CopyColumnHeaders = DefaultBoolean.False
|
oView.OptionsClipboard.CopyColumnHeaders = DefaultBoolean.False
|
||||||
'oView.OptionsView.ColumnAutoWidth = True
|
'oView.OptionsView.ColumnAutoWidth = True
|
||||||
If oView.OptionsBehavior.ReadOnly = False Then
|
|
||||||
If row.Item("VKT_ADD_ITEM") = True Then
|
If row.Item("VKT_ADD_ITEM") = True And oView.OptionsBehavior.Editable Then
|
||||||
oView.OptionsBehavior.AllowAddRows = DefaultBoolean.True
|
oView.OptionsBehavior.AllowAddRows = DefaultBoolean.True
|
||||||
oView.OptionsBehavior.AllowDeleteRows = DefaultBoolean.True
|
oView.OptionsBehavior.AllowDeleteRows = DefaultBoolean.True
|
||||||
oView.OptionsView.NewItemRowPosition = NewItemRowPosition.Bottom
|
oView.OptionsView.NewItemRowPosition = NewItemRowPosition.Bottom
|
||||||
Else
|
Else
|
||||||
oView.OptionsBehavior.Editable = False
|
oView.OptionsView.NewItemRowPosition = NewItemRowPosition.None
|
||||||
oView.OptionsView.NewItemRowPosition = NewItemRowPosition.None
|
oView.OptionsBehavior.AllowAddRows = DefaultBoolean.False
|
||||||
End If
|
oView.OptionsBehavior.AllowDeleteRows = DefaultBoolean.False
|
||||||
End If
|
End If
|
||||||
|
|
||||||
Logger.Debug("Grid [{0}] setup: READ_ONLY(Row)=[{1}], View.Editable=[{2}], View.ReadOnly=[{3}], AllowAddRows=[{4}]",
|
Logger.Debug("Grid [{0}] setup: READ_ONLY(Row)=[{1}], View.Editable=[{2}], View.ReadOnly=[{3}], AllowAddRows=[{4}]",
|
||||||
oControl.Name,
|
oControl.Name,
|
||||||
row.Item("READ_ONLY"),
|
row.Item("READ_ONLY"),
|
||||||
|
|||||||
@@ -32,6 +32,6 @@ Imports System.Runtime.InteropServices
|
|||||||
' übernehmen, indem Sie "*" eingeben:
|
' übernehmen, indem Sie "*" eingeben:
|
||||||
' <Assembly: AssemblyVersion("1.0.*")>
|
' <Assembly: AssemblyVersion("1.0.*")>
|
||||||
|
|
||||||
<Assembly: AssemblyVersion("3.6.3.0")>
|
<Assembly: AssemblyVersion("3.6.5.0")>
|
||||||
<Assembly: AssemblyFileVersion("1.0.0.0")>
|
<Assembly: AssemblyFileVersion("1.0.0.0")>
|
||||||
<Assembly: NeutralResourcesLanguage("")>
|
<Assembly: NeutralResourcesLanguage("")>
|
||||||
|
|||||||
@@ -1725,46 +1725,46 @@
|
|||||||
<value>
|
<value>
|
||||||
AAEAAAD/////AQAAAAAAAAAMAgAAAFdTeXN0ZW0uV2luZG93cy5Gb3JtcywgVmVyc2lvbj00LjAuMC4w
|
AAEAAAD/////AQAAAAAAAAAMAgAAAFdTeXN0ZW0uV2luZG93cy5Gb3JtcywgVmVyc2lvbj00LjAuMC4w
|
||||||
LCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWI3N2E1YzU2MTkzNGUwODkFAQAAACZTeXN0
|
LCBDdWx0d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|
AQ8B8AEPBAAB4AEHAeABBwQAAcABAwHAAQMEAAGAAQEBgAEBBAABgAEBAYABAQQAAYABAQGAAQEEAAGA
|
||||||
AYABAQQAAYABAQGAAQEEAAGAAQEBgAEBBAABwAEDAcABAwQAAeABBwHgAQcEAAHwAQ8B8AEPBAAB+AEf
|
AQEBgAEBBAABgAEBAYABAQQAAYABAQGAAQEEAAHAAQMBwAEDBAAB4AEHAeABBwQAAfABDwHwAQ8EAAH4
|
||||||
AfgBHwQABP8EAAs=
|
AR8B+AEfBAAE/wQACw==
|
||||||
</value>
|
</value>
|
||||||
</data>
|
</data>
|
||||||
<metadata name="DD_DMSLiteDataSet.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
<metadata name="DD_DMSLiteDataSet.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||||
|
|||||||
@@ -82,6 +82,8 @@ Public Class frmMain
|
|||||||
Private COCKPIT_PROFILE_SQL As String = String.Empty
|
Private COCKPIT_PROFILE_SQL As String = String.Empty
|
||||||
Private COCKPIT_CONFIG_ID As Integer = 0
|
Private COCKPIT_CONFIG_ID As Integer = 0
|
||||||
Private _emptyNodeCount As Integer = 0
|
Private _emptyNodeCount As Integer = 0
|
||||||
|
Private _lastClickedGroupValue As Object = Nothing
|
||||||
|
Private _lastClickedDocId As Object = Nothing
|
||||||
|
|
||||||
|
|
||||||
Private Class S
|
Private Class S
|
||||||
@@ -303,7 +305,7 @@ Public Class frmMain
|
|||||||
|
|
||||||
bsiLicenses.Visibility = DevExpress.XtraBars.BarItemVisibility.Always
|
bsiLicenses.Visibility = DevExpress.XtraBars.BarItemVisibility.Always
|
||||||
If EDMIAppServerActive = True Then
|
If EDMIAppServerActive = True Then
|
||||||
bbtnitm_Appservice.Visibility = DevExpress.XtraBars.BarItemVisibility.Always
|
bbtnitm_Appservice.Visibility = DevExpress.XtraBars.BarItemVisibility.Always
|
||||||
End If
|
End If
|
||||||
|
|
||||||
Else
|
Else
|
||||||
@@ -2134,7 +2136,7 @@ Public Class frmMain
|
|||||||
ClassAllgemeineFunktionen.ApplyGridView_Col_Formatting(GridViewWorkflows)
|
ClassAllgemeineFunktionen.ApplyGridView_Col_Formatting(GridViewWorkflows)
|
||||||
End Function
|
End Function
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Private Async Function CreateBasicViewForProfile() As Task
|
Private Async Function CreateBasicViewForProfile() As Task
|
||||||
' ===== GRID DATASOURCE ZURÜCKSETZEN =====
|
' ===== GRID DATASOURCE ZURÜCKSETZEN =====
|
||||||
@@ -2746,6 +2748,7 @@ Public Class frmMain
|
|||||||
|
|
||||||
If isGroupRow OrElse (startedFrom = "CMGROUP" AndAlso isDataRow) Then
|
If isGroupRow OrElse (startedFrom = "CMGROUP" AndAlso isDataRow) Then
|
||||||
' GRUPPE: Workflow ohne spezifisches Dokument
|
' GRUPPE: Workflow ohne spezifisches Dokument
|
||||||
|
SaveGridStateForRestore(effectiveRowHandle, isGroupRow, isDataRow)
|
||||||
Reset_Current()
|
Reset_Current()
|
||||||
CURRENT_ProfilGUID = CURRENT_CLICKED_PROFILE_ID
|
CURRENT_ProfilGUID = CURRENT_CLICKED_PROFILE_ID
|
||||||
LOGGER.Debug($"Item_Scope: isGroupRow...CURRENT_CLICKED_PROFILE_ID [{CURRENT_CLICKED_PROFILE_ID}]")
|
LOGGER.Debug($"Item_Scope: isGroupRow...CURRENT_CLICKED_PROFILE_ID [{CURRENT_CLICKED_PROFILE_ID}]")
|
||||||
@@ -2796,6 +2799,7 @@ Public Class frmMain
|
|||||||
Dim oResult = DatabaseFallback.GetScalarValueECM(oSQL)
|
Dim oResult = DatabaseFallback.GetScalarValueECM(oSQL)
|
||||||
|
|
||||||
If CBool(oResult) = True Then
|
If CBool(oResult) = True Then
|
||||||
|
SaveGridStateForRestore(effectiveRowHandle, isGroupRow, isDataRow)
|
||||||
Load_Profil_from_Grid(CURRENT_CLICKED_PROFILE_ID)
|
Load_Profil_from_Grid(CURRENT_CLICKED_PROFILE_ID)
|
||||||
Else
|
Else
|
||||||
Dim omsg = S.Der_gewählte_Beleg_ist_durch_einen_anderen_Benutzer_bereits_in_Bearbeitung_oder_anderweitig_gesperrt_
|
Dim omsg = S.Der_gewählte_Beleg_ist_durch_einen_anderen_Benutzer_bereits_in_Bearbeitung_oder_anderweitig_gesperrt_
|
||||||
@@ -2826,21 +2830,14 @@ Public Class frmMain
|
|||||||
End Function
|
End Function
|
||||||
Private Async Sub ValidatorClosed(sender As Object, e As FormClosedEventArgs)
|
Private Async Sub ValidatorClosed(sender As Object, e As FormClosedEventArgs)
|
||||||
Dim oGridOverlayHandle As Object = Nothing
|
Dim oGridOverlayHandle As Object = Nothing
|
||||||
' ← NEU: Kontext vor dem Reload sichern
|
|
||||||
Dim oPreviousLoadType As String = GRID_LOAD_TYPE
|
Dim oPreviousLoadType As String = GRID_LOAD_TYPE
|
||||||
Dim oPreviousProfileId As Integer = If(IsNumeric(CURRENT_CLICKED_PROFILE_ID), CInt(CURRENT_CLICKED_PROFILE_ID), 0)
|
|
||||||
Try
|
Try
|
||||||
' Aktuellen Grid-Zustand sichern BEVOR DataSource zurückgesetzt wird
|
|
||||||
If GridControlWorkflows.Visible = True AndAlso FormOpenClose = False Then
|
If GridControlWorkflows.Visible = True AndAlso FormOpenClose = False Then
|
||||||
RefreshHelper.SaveViewInfo()
|
RefreshHelper.SaveViewInfo()
|
||||||
End If
|
End If
|
||||||
|
|
||||||
' DevExpress-Overlay NUR über dem Grid anzeigen – verhindert leere Bereiche
|
|
||||||
' und signalisiert dem Nutzer den laufenden Ladevorgang direkt im Grid-Bereich.
|
|
||||||
' ShowOverlayForm(Control) ist die empfohlene DevExpress-Methode hierfür.
|
|
||||||
oGridOverlayHandle = SplashScreenManager.ShowOverlayForm(GridControlWorkflows)
|
oGridOverlayHandle = SplashScreenManager.ShowOverlayForm(GridControlWorkflows)
|
||||||
|
|
||||||
' BeginUpdate verhindert zusätzliche Paint-Events während des Neuaufbaus.
|
|
||||||
GridControlWorkflows.BeginUpdate()
|
GridControlWorkflows.BeginUpdate()
|
||||||
GridViewWorkflows.BeginUpdate()
|
GridViewWorkflows.BeginUpdate()
|
||||||
Try
|
Try
|
||||||
@@ -2853,21 +2850,102 @@ Public Class frmMain
|
|||||||
If GridControlWorkflows.Visible = True AndAlso FormOpenClose = False Then
|
If GridControlWorkflows.Visible = True AndAlso FormOpenClose = False Then
|
||||||
RefreshHelper.LoadViewInfo()
|
RefreshHelper.LoadViewInfo()
|
||||||
End If
|
End If
|
||||||
' ← NEU: Bei OVERVIEW + CMROW dieselbe Gruppe wiederherstellen
|
|
||||||
If oPreviousLoadType = "OVERVIEW" AndAlso oPreviousProfileId > 0 Then
|
RestoreGridStateAfterValidation()
|
||||||
LOGGER.Debug($"ValidatorClosed: Restoring group for PROFILE_ID [{oPreviousProfileId}] after OVERVIEW reload")
|
|
||||||
RestoreGroupForProfile(oPreviousProfileId)
|
|
||||||
End If
|
|
||||||
Catch ex As Exception
|
Catch ex As Exception
|
||||||
LOGGER.Error(ex)
|
LOGGER.Error(ex)
|
||||||
Finally
|
Finally
|
||||||
' Overlay immer schließen – auch bei Fehlern
|
|
||||||
If oGridOverlayHandle IsNot Nothing Then
|
If oGridOverlayHandle IsNot Nothing Then
|
||||||
SplashScreenManager.CloseOverlayForm(oGridOverlayHandle)
|
SplashScreenManager.CloseOverlayForm(oGridOverlayHandle)
|
||||||
End If
|
End If
|
||||||
End Try
|
End Try
|
||||||
End Sub
|
End Sub
|
||||||
|
Private Sub RestoreGridStateAfterValidation()
|
||||||
|
Try
|
||||||
|
' Keine Wiederherstellung wenn Grid leer ist
|
||||||
|
If GridViewWorkflows.RowCount = 0 Then
|
||||||
|
LOGGER.Debug("RestoreGridStateAfterValidation: Grid has no rows - skipping")
|
||||||
|
Exit Sub
|
||||||
|
End If
|
||||||
|
|
||||||
|
' Kein Grouping aktiv → nur DocID-Zeile fokussieren
|
||||||
|
If GridViewWorkflows.GroupCount = 0 Then
|
||||||
|
If _lastClickedDocId IsNot Nothing Then
|
||||||
|
FocusRowByDocId(_lastClickedDocId)
|
||||||
|
End If
|
||||||
|
Exit Sub
|
||||||
|
End If
|
||||||
|
|
||||||
|
' Kein gespeicherter Gruppenwert → nichts tun
|
||||||
|
If _lastClickedGroupValue Is Nothing Then
|
||||||
|
LOGGER.Debug("RestoreGridStateAfterValidation: No group value stored - skipping")
|
||||||
|
Exit Sub
|
||||||
|
End If
|
||||||
|
|
||||||
|
Dim groupTextCol As GridColumn = GridViewWorkflows.Columns.ColumnByFieldName("GROUP_TEXT")
|
||||||
|
If groupTextCol Is Nothing Then
|
||||||
|
Exit Sub
|
||||||
|
End If
|
||||||
|
|
||||||
|
' Ziel-Gruppen-Handle über Datenzeilen ermitteln
|
||||||
|
Dim targetGroupHandle As Integer = DevExpress.XtraGrid.GridControl.InvalidRowHandle
|
||||||
|
|
||||||
|
For rowHandle As Integer = 0 To GridViewWorkflows.RowCount - 1
|
||||||
|
If Not GridViewWorkflows.IsDataRow(rowHandle) Then Continue For
|
||||||
|
Dim groupVal As Object = GridViewWorkflows.GetRowCellValue(rowHandle, groupTextCol)
|
||||||
|
If groupVal IsNot Nothing AndAlso groupVal.ToString() = _lastClickedGroupValue.ToString() Then
|
||||||
|
targetGroupHandle = GridViewWorkflows.GetParentRowHandle(rowHandle)
|
||||||
|
Exit For
|
||||||
|
End If
|
||||||
|
Next
|
||||||
|
|
||||||
|
' Alle Gruppen schließen
|
||||||
|
GridViewWorkflows.CollapseAllGroups()
|
||||||
|
|
||||||
|
If targetGroupHandle = DevExpress.XtraGrid.GridControl.InvalidRowHandle OrElse
|
||||||
|
Not GridViewWorkflows.IsGroupRow(targetGroupHandle) Then
|
||||||
|
LOGGER.Warn($"RestoreGridStateAfterValidation: Group [{_lastClickedGroupValue}] not found in reloaded grid")
|
||||||
|
Exit Sub
|
||||||
|
End If
|
||||||
|
|
||||||
|
' Ziel-Gruppe aufklappen und fokussieren
|
||||||
|
GridViewWorkflows.ExpandGroupRow(targetGroupHandle, False)
|
||||||
|
GridViewWorkflows.FocusedRowHandle = targetGroupHandle
|
||||||
|
LOGGER.Debug($"RestoreGridStateAfterValidation: Group [{_lastClickedGroupValue}] expanded and focused")
|
||||||
|
|
||||||
|
' DocID-Zeile innerhalb der Gruppe fokussieren (falls noch vorhanden)
|
||||||
|
If _lastClickedDocId IsNot Nothing Then
|
||||||
|
FocusRowByDocId(_lastClickedDocId)
|
||||||
|
End If
|
||||||
|
|
||||||
|
Catch ex As Exception
|
||||||
|
LOGGER.Error(ex)
|
||||||
|
End Try
|
||||||
|
|
||||||
|
End Sub
|
||||||
|
Private Sub FocusRowByDocId(docId As Object)
|
||||||
|
Try
|
||||||
|
Dim docIdCol As GridColumn = GridViewWorkflows.Columns.ColumnByFieldName("DocID")
|
||||||
|
If docIdCol Is Nothing Then
|
||||||
|
Exit Sub
|
||||||
|
End If
|
||||||
|
|
||||||
|
For rowHandle As Integer = 0 To GridViewWorkflows.RowCount - 1
|
||||||
|
If Not GridViewWorkflows.IsDataRow(rowHandle) Then Continue For
|
||||||
|
Dim val As Object = GridViewWorkflows.GetRowCellValue(rowHandle, docIdCol)
|
||||||
|
If val IsNot Nothing AndAlso val.ToString() = docId.ToString() Then
|
||||||
|
GridViewWorkflows.FocusedRowHandle = rowHandle
|
||||||
|
LOGGER.Debug($"FocusRowByDocId: Row with DocID [{docId}] focused")
|
||||||
|
Exit Sub
|
||||||
|
End If
|
||||||
|
Next
|
||||||
|
|
||||||
|
LOGGER.Debug($"FocusRowByDocId: DocID [{docId}] no longer in grid (likely processed)")
|
||||||
|
Catch ex As Exception
|
||||||
|
LOGGER.Error(ex)
|
||||||
|
End Try
|
||||||
|
End Sub
|
||||||
Private Sub RestoreGroupForProfile(pProfileId As Integer)
|
Private Sub RestoreGroupForProfile(pProfileId As Integer)
|
||||||
Try
|
Try
|
||||||
If GridViewWorkflows.GroupCount = 0 Then
|
If GridViewWorkflows.GroupCount = 0 Then
|
||||||
@@ -3373,7 +3451,38 @@ Public Class frmMain
|
|||||||
Await Decide_Load(FormLoad)
|
Await Decide_Load(FormLoad)
|
||||||
InResetlayout = False
|
InResetlayout = False
|
||||||
End Function
|
End Function
|
||||||
|
Private Sub SaveGridStateForRestore(effectiveRowHandle As Integer, isGroupRow As Boolean, isDataRow As Boolean)
|
||||||
|
_lastClickedGroupValue = Nothing
|
||||||
|
_lastClickedDocId = Nothing
|
||||||
|
|
||||||
|
If GridViewWorkflows.GroupCount = 0 Then
|
||||||
|
Exit Sub
|
||||||
|
End If
|
||||||
|
|
||||||
|
Try
|
||||||
|
Dim groupTextCol As GridColumn = GridViewWorkflows.Columns.ColumnByFieldName("GROUP_TEXT")
|
||||||
|
If groupTextCol Is Nothing Then
|
||||||
|
Exit Sub
|
||||||
|
End If
|
||||||
|
|
||||||
|
If isGroupRow Then
|
||||||
|
Dim childHandle As Integer = GridViewWorkflows.GetChildRowHandle(effectiveRowHandle, 0)
|
||||||
|
If childHandle <> DevExpress.XtraGrid.GridControl.InvalidRowHandle Then
|
||||||
|
_lastClickedGroupValue = GridViewWorkflows.GetRowCellValue(childHandle, groupTextCol)
|
||||||
|
End If
|
||||||
|
ElseIf isDataRow Then
|
||||||
|
_lastClickedGroupValue = GridViewWorkflows.GetRowCellValue(effectiveRowHandle, groupTextCol)
|
||||||
|
Dim docIdCol As GridColumn = GridViewWorkflows.Columns.ColumnByFieldName("DocID")
|
||||||
|
If docIdCol IsNot Nothing Then
|
||||||
|
_lastClickedDocId = GridViewWorkflows.GetRowCellValue(effectiveRowHandle, docIdCol)
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
|
||||||
|
LOGGER.Debug($"SaveGridStateForRestore: GroupValue=[{_lastClickedGroupValue}] DocId=[{_lastClickedDocId}]")
|
||||||
|
Catch ex As Exception
|
||||||
|
LOGGER.Warn($"SaveGridStateForRestore: Failed - {ex.Message}")
|
||||||
|
End Try
|
||||||
|
End Sub
|
||||||
Private Async Sub GridViewWorkflows_DoubleClick(sender As Object, e As EventArgs) Handles GridViewWorkflows.DoubleClick
|
Private Async Sub GridViewWorkflows_DoubleClick(sender As Object, e As EventArgs) Handles GridViewWorkflows.DoubleClick
|
||||||
Try
|
Try
|
||||||
' ===== KRITISCH: HitInfo MIT AKTUELLEM Mauszeiger-Position berechnen =====
|
' ===== KRITISCH: HitInfo MIT AKTUELLEM Mauszeiger-Position berechnen =====
|
||||||
@@ -4810,7 +4919,7 @@ FROM VWPM_PROFILE_ACTIVE T WHERE T.GUID IN (SELECT PROFILE_ID FROM [dbo].[FNPM_G
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
Select Case oTypeIdInt
|
Select Case oTypeIdInt
|
||||||
|
|
||||||
Case 0
|
Case 0
|
||||||
LOGGER.Debug("TreeList_Cockpit: Loading overview")
|
LOGGER.Debug("TreeList_Cockpit: Loading overview")
|
||||||
|
|||||||
1
app/TaskFlow/frmValidator.Designer.vb
generated
1
app/TaskFlow/frmValidator.Designer.vb
generated
@@ -232,6 +232,7 @@ Partial Class frmValidator
|
|||||||
'
|
'
|
||||||
'PanelValidatorControl
|
'PanelValidatorControl
|
||||||
'
|
'
|
||||||
|
Me.PanelValidatorControl.AllowTouchScroll = True
|
||||||
resources.ApplyResources(Me.PanelValidatorControl, "PanelValidatorControl")
|
resources.ApplyResources(Me.PanelValidatorControl, "PanelValidatorControl")
|
||||||
Me.PanelValidatorControl.Appearance.BackColor = System.Drawing.Color.Transparent
|
Me.PanelValidatorControl.Appearance.BackColor = System.Drawing.Color.Transparent
|
||||||
Me.PanelValidatorControl.Appearance.Options.UseBackColor = True
|
Me.PanelValidatorControl.Appearance.Options.UseBackColor = True
|
||||||
|
|||||||
@@ -700,6 +700,8 @@ Public Class frmValidator
|
|||||||
RemoveHandler gv.ShowingEditor, AddressOf GridView_ShowingEditor_EnsureLookupColumnEdit
|
RemoveHandler gv.ShowingEditor, AddressOf GridView_ShowingEditor_EnsureLookupColumnEdit
|
||||||
RemoveHandler gv.ShownEditor, AddressOf GridView_ShownEditor_RefreshLookupSql
|
RemoveHandler gv.ShownEditor, AddressOf GridView_ShownEditor_RefreshLookupSql
|
||||||
RemoveHandler gv.HiddenEditor, AddressOf GridView_HiddenEditor_DetachQueryPopUp
|
RemoveHandler gv.HiddenEditor, AddressOf GridView_HiddenEditor_DetachQueryPopUp
|
||||||
|
RemoveHandler gv.ValidatingEditor, AddressOf GridView_ValidatingEditor_LogLookup
|
||||||
|
RemoveHandler gv.InvalidValueException, AddressOf GridView_InvalidValueException_LogLookup
|
||||||
' DataSource-Events ebenfalls trennen
|
' DataSource-Events ebenfalls trennen
|
||||||
If TypeOf gv.DataController.DataSource Is DataTable Then
|
If TypeOf gv.DataController.DataSource Is DataTable Then
|
||||||
Dim dt = DirectCast(gv.DataController.DataSource, DataTable)
|
Dim dt = DirectCast(gv.DataController.DataSource, DataTable)
|
||||||
@@ -716,6 +718,183 @@ Public Class frmValidator
|
|||||||
End If
|
End If
|
||||||
Next
|
Next
|
||||||
End Sub
|
End Sub
|
||||||
|
Private Sub GridView_ValidatingEditor_LogLookup(sender As Object, e As DevExpress.XtraEditors.Controls.BaseContainerValidateEditorEventArgs)
|
||||||
|
Try
|
||||||
|
Dim oView As GridView = TryCast(sender, GridView)
|
||||||
|
If oView Is Nothing OrElse oView.FocusedColumn Is Nothing Then Exit Sub
|
||||||
|
|
||||||
|
Dim oRepo As RepositoryItem = oView.FocusedColumn.ColumnEdit
|
||||||
|
|
||||||
|
If TypeOf oRepo Is RepositoryItemComboBox Then
|
||||||
|
Dim oComboRepo As RepositoryItemComboBox = DirectCast(oRepo, RepositoryItemComboBox)
|
||||||
|
Dim oCanonical As String = Nothing
|
||||||
|
|
||||||
|
If TryNormalizeComboValue(oComboRepo, e.Value, oCanonical) Then
|
||||||
|
e.Value = oCanonical
|
||||||
|
e.Valid = True
|
||||||
|
MyValidationLogger.Debug($"[GridValidation][ComboFix] Column=[{oView.FocusedColumn.FieldName}], Input=[{Convert.ToString(e.Value)}], Canonical=[{oCanonical}]")
|
||||||
|
Else
|
||||||
|
e.Valid = False
|
||||||
|
e.ErrorText = "Ungültiger Wert"
|
||||||
|
MyValidationLogger.Warn($"[GridValidation][ComboFix] Column=[{oView.FocusedColumn.FieldName}] Value not found in Combo items: [{Convert.ToString(e.Value)}]")
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
|
||||||
|
LogGridLookupValidationContext(oView, e.Value, "ValidatingEditor")
|
||||||
|
Catch ex As Exception
|
||||||
|
MyValidationLogger.Warn($"⚠️ [GridView_ValidatingEditor_LogLookup] {ex.Message}")
|
||||||
|
End Try
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Private Sub GridView_InvalidValueException_LogLookup(sender As Object, e As DevExpress.XtraEditors.Controls.InvalidValueExceptionEventArgs)
|
||||||
|
Try
|
||||||
|
Dim oView As GridView = TryCast(sender, GridView)
|
||||||
|
If oView Is Nothing Then Exit Sub
|
||||||
|
|
||||||
|
Dim oRepo As RepositoryItem = Nothing
|
||||||
|
If oView.FocusedColumn IsNot Nothing Then
|
||||||
|
oRepo = oView.FocusedColumn.ColumnEdit
|
||||||
|
End If
|
||||||
|
|
||||||
|
If TypeOf oRepo Is RepositoryItemComboBox Then
|
||||||
|
Dim oComboRepo As RepositoryItemComboBox = DirectCast(oRepo, RepositoryItemComboBox)
|
||||||
|
Dim oCanonical As String = Nothing
|
||||||
|
|
||||||
|
Dim editorValue As Object = Nothing
|
||||||
|
If oView.ActiveEditor IsNot Nothing Then
|
||||||
|
editorValue = oView.ActiveEditor.EditValue
|
||||||
|
End If
|
||||||
|
|
||||||
|
If TryNormalizeComboValue(oComboRepo, editorValue, oCanonical) Then
|
||||||
|
If oView.FocusedColumn IsNot Nothing AndAlso oView.FocusedRowHandle >= 0 Then
|
||||||
|
oView.SetRowCellValue(oView.FocusedRowHandle, oView.FocusedColumn, oCanonical)
|
||||||
|
End If
|
||||||
|
e.ExceptionMode = DevExpress.XtraEditors.Controls.ExceptionMode.NoAction
|
||||||
|
MyValidationLogger.Warn($"[GridValidation][ComboFix] InvalidValueException suppressed; normalized to [{oCanonical}]")
|
||||||
|
Return
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
|
||||||
|
Dim oCurrentValue As Object = Nothing
|
||||||
|
Try
|
||||||
|
If oView.FocusedColumn IsNot Nothing AndAlso oView.FocusedRowHandle >= 0 Then
|
||||||
|
oCurrentValue = oView.GetFocusedValue()
|
||||||
|
End If
|
||||||
|
Catch
|
||||||
|
End Try
|
||||||
|
|
||||||
|
LogGridLookupValidationContext(oView, oCurrentValue, "InvalidValueException")
|
||||||
|
|
||||||
|
Dim oExceptionText As String = ""
|
||||||
|
If e.Exception IsNot Nothing Then
|
||||||
|
oExceptionText = e.Exception.Message
|
||||||
|
End If
|
||||||
|
|
||||||
|
MyValidationLogger.Warn($"[GridValidation][InvalidValueException] ErrorText=[{e.ErrorText}], Exception=[{oExceptionText}]")
|
||||||
|
Catch ex As Exception
|
||||||
|
MyValidationLogger.Warn($"⚠️ [GridView_InvalidValueException_LogLookup] {ex.Message}")
|
||||||
|
End Try
|
||||||
|
End Sub
|
||||||
|
Private Function TryNormalizeComboValue(pRepo As RepositoryItemComboBox, pValue As Object, ByRef pCanonical As String) As Boolean
|
||||||
|
pCanonical = Nothing
|
||||||
|
|
||||||
|
If pRepo Is Nothing Then Return False
|
||||||
|
If pValue Is Nothing OrElse IsDBNull(pValue) Then Return False
|
||||||
|
|
||||||
|
Dim input As String = Convert.ToString(pValue, CultureInfo.InvariantCulture)
|
||||||
|
If input Is Nothing Then Return False
|
||||||
|
input = input.Trim()
|
||||||
|
|
||||||
|
For Each item As Object In pRepo.Items
|
||||||
|
Dim candidate As String = Convert.ToString(item, CultureInfo.InvariantCulture)
|
||||||
|
If candidate Is Nothing Then Continue For
|
||||||
|
|
||||||
|
Dim normalizedCandidate As String = candidate.Trim()
|
||||||
|
If String.Equals(normalizedCandidate, input, StringComparison.OrdinalIgnoreCase) Then
|
||||||
|
pCanonical = candidate
|
||||||
|
Return True
|
||||||
|
End If
|
||||||
|
Next
|
||||||
|
|
||||||
|
Return False
|
||||||
|
End Function
|
||||||
|
Private Sub LogGridLookupValidationContext(pView As GridView, pValue As Object, pPhase As String)
|
||||||
|
If pView Is Nothing OrElse pView.FocusedColumn Is Nothing Then Exit Sub
|
||||||
|
|
||||||
|
Dim oColumn As GridColumn = pView.FocusedColumn
|
||||||
|
Dim oRepo As RepositoryItem = oColumn.ColumnEdit
|
||||||
|
|
||||||
|
Dim oValueText As String = "<NULL>"
|
||||||
|
Dim oValueType As String = "<NULL>"
|
||||||
|
If pValue IsNot Nothing AndAlso Not IsDBNull(pValue) Then
|
||||||
|
oValueText = pValue.ToString()
|
||||||
|
oValueType = pValue.GetType().FullName
|
||||||
|
End If
|
||||||
|
|
||||||
|
Dim oTargetType As String = "<unknown>"
|
||||||
|
Dim oGridData As DataTable = TryCast(pView.GridControl.DataSource, DataTable)
|
||||||
|
If oGridData IsNot Nothing AndAlso oGridData.Columns.Contains(oColumn.FieldName) Then
|
||||||
|
oTargetType = oGridData.Columns(oColumn.FieldName).DataType.FullName
|
||||||
|
End If
|
||||||
|
|
||||||
|
Dim oValueMember As String = ""
|
||||||
|
Dim oDisplayMember As String = ""
|
||||||
|
Dim oDataSourceRows As Integer = -1
|
||||||
|
Dim oValueFound As String = "n/a"
|
||||||
|
|
||||||
|
If oRepo IsNot Nothing Then
|
||||||
|
If TypeOf oRepo Is RepositoryItemLookupControl3 Then
|
||||||
|
Dim oLookupRepo As RepositoryItemLookupControl3 = DirectCast(oRepo, RepositoryItemLookupControl3)
|
||||||
|
oValueMember = oLookupRepo.ValueMember
|
||||||
|
oDisplayMember = oLookupRepo.DisplayMember
|
||||||
|
|
||||||
|
Dim oLookupDt As DataTable = TryCast(oLookupRepo.DataSource, DataTable)
|
||||||
|
If oLookupDt IsNot Nothing Then
|
||||||
|
oDataSourceRows = oLookupDt.Rows.Count
|
||||||
|
|
||||||
|
If Not String.IsNullOrWhiteSpace(oValueMember) AndAlso oLookupDt.Columns.Contains(oValueMember) Then
|
||||||
|
Dim found As Boolean = oLookupDt.AsEnumerable().Any(
|
||||||
|
Function(r) String.Equals(
|
||||||
|
Convert.ToString(r(oValueMember), CultureInfo.InvariantCulture),
|
||||||
|
oValueText,
|
||||||
|
StringComparison.OrdinalIgnoreCase))
|
||||||
|
oValueFound = found.ToString()
|
||||||
|
Else
|
||||||
|
oValueFound = "ValueMemberMissing"
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
|
||||||
|
ElseIf TypeOf oRepo Is RepositoryItemLookUpEdit Then
|
||||||
|
Dim oLookupRepo As RepositoryItemLookUpEdit = DirectCast(oRepo, RepositoryItemLookUpEdit)
|
||||||
|
oValueMember = oLookupRepo.ValueMember
|
||||||
|
oDisplayMember = oLookupRepo.DisplayMember
|
||||||
|
|
||||||
|
Dim oLookupDt As DataTable = TryCast(oLookupRepo.DataSource, DataTable)
|
||||||
|
If oLookupDt IsNot Nothing Then
|
||||||
|
oDataSourceRows = oLookupDt.Rows.Count
|
||||||
|
|
||||||
|
If Not String.IsNullOrWhiteSpace(oValueMember) AndAlso oLookupDt.Columns.Contains(oValueMember) Then
|
||||||
|
Dim found As Boolean = oLookupDt.AsEnumerable().Any(
|
||||||
|
Function(r) String.Equals(
|
||||||
|
Convert.ToString(r(oValueMember), CultureInfo.InvariantCulture),
|
||||||
|
oValueText,
|
||||||
|
StringComparison.OrdinalIgnoreCase))
|
||||||
|
oValueFound = found.ToString()
|
||||||
|
Else
|
||||||
|
oValueFound = "ValueMemberMissing"
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
|
||||||
|
Dim oRepoType As String = "<None>"
|
||||||
|
If oRepo IsNot Nothing Then
|
||||||
|
oRepoType = oRepo.GetType().Name
|
||||||
|
End If
|
||||||
|
|
||||||
|
MyValidationLogger.Warn(
|
||||||
|
$"[GridValidation][{pPhase}] Column=[{oColumn.FieldName}], Value=[{oValueText}], ValueType=[{oValueType}], TargetType=[{oTargetType}], Repo=[{oRepoType}], ValueMember=[{oValueMember}], DisplayMember=[{oDisplayMember}], DataSourceRows=[{oDataSourceRows}], ValueFound=[{oValueFound}]")
|
||||||
|
End Sub
|
||||||
Private Sub frmValidation_FormClosing(sender As Object, e As System.Windows.Forms.FormClosingEventArgs) Handles Me.FormClosing
|
Private Sub frmValidation_FormClosing(sender As Object, e As System.Windows.Forms.FormClosingEventArgs) Handles Me.FormClosing
|
||||||
' Guard: Re-Entry und Post-Dispose-Aufrufe verhindern
|
' Guard: Re-Entry und Post-Dispose-Aufrufe verhindern
|
||||||
If _isClosingGuard Then
|
If _isClosingGuard Then
|
||||||
@@ -1754,6 +1933,8 @@ Public Class frmValidator
|
|||||||
AddHandler DirectCast(oGrid.MainView, GridView).ShowingEditor, AddressOf GridView_ShowingEditor_EnsureLookupColumnEdit
|
AddHandler DirectCast(oGrid.MainView, GridView).ShowingEditor, AddressOf GridView_ShowingEditor_EnsureLookupColumnEdit
|
||||||
AddHandler DirectCast(oGrid.MainView, GridView).ShownEditor, AddressOf GridView_ShownEditor_RefreshLookupSql
|
AddHandler DirectCast(oGrid.MainView, GridView).ShownEditor, AddressOf GridView_ShownEditor_RefreshLookupSql
|
||||||
AddHandler DirectCast(oGrid.MainView, GridView).HiddenEditor, AddressOf GridView_HiddenEditor_DetachQueryPopUp
|
AddHandler DirectCast(oGrid.MainView, GridView).HiddenEditor, AddressOf GridView_HiddenEditor_DetachQueryPopUp
|
||||||
|
AddHandler DirectCast(oGrid.MainView, GridView).ValidatingEditor, AddressOf GridView_ValidatingEditor_LogLookup
|
||||||
|
AddHandler DirectCast(oGrid.MainView, GridView).InvalidValueException, AddressOf GridView_InvalidValueException_LogLookup
|
||||||
Case "LINE"
|
Case "LINE"
|
||||||
|
|
||||||
oMyControl = ControlCreator.CreateExistingLine(oControlRow, False)
|
oMyControl = ControlCreator.CreateExistingLine(oControlRow, False)
|
||||||
@@ -2385,8 +2566,13 @@ Public Class frmValidator
|
|||||||
|
|
||||||
MyValidationLogger.Debug($"[GridRefresh] ShownEditor: Column=[{oView.FocusedColumn.FieldName}], Editor=[{oView.ActiveEditor.GetType().Name}]")
|
MyValidationLogger.Debug($"[GridRefresh] ShownEditor: Column=[{oView.FocusedColumn.FieldName}], Editor=[{oView.ActiveEditor.GetType().Name}]")
|
||||||
|
|
||||||
' WICHTIG: initial sofort laden (nicht erst bei QueryPopUp)
|
' FIX:
|
||||||
RefreshGridDropdownSqlForCurrentColumn(oView)
|
' KEIN erneutes Refresh der Lookup-DataSource mehr während laufender Editierung.
|
||||||
|
' Sonst kann der gerade gewählte Wert beim Zellverlassen ungültig werden.
|
||||||
|
' Nur Fallback: falls noch kein ColumnEdit gesetzt ist, einmalig setzen.
|
||||||
|
If oView.FocusedColumn.ColumnEdit Is Nothing Then
|
||||||
|
RefreshGridDropdownSqlForCurrentColumn(oView)
|
||||||
|
End If
|
||||||
|
|
||||||
Dim oPopupEditor As PopupBaseEdit = TryCast(oView.ActiveEditor, PopupBaseEdit)
|
Dim oPopupEditor As PopupBaseEdit = TryCast(oView.ActiveEditor, PopupBaseEdit)
|
||||||
If oPopupEditor Is Nothing Then Exit Sub
|
If oPopupEditor Is Nothing Then Exit Sub
|
||||||
@@ -2429,35 +2615,15 @@ Public Class frmValidator
|
|||||||
|
|
||||||
If oView Is Nothing OrElse oView.FocusedColumn Is Nothing Then Exit Sub
|
If oView Is Nothing OrElse oView.FocusedColumn Is Nothing Then Exit Sub
|
||||||
|
|
||||||
Dim oMeta As ClassControlCreator.ControlMetadata = TryCast(oView.GridControl.Tag, ClassControlCreator.ControlMetadata)
|
' FIX:
|
||||||
If oMeta Is Nothing Then Exit Sub
|
' Beim Öffnen des Popups NICHT erneut SQL-Cache invalidieren / DataSource neu aufbauen.
|
||||||
|
' Nur falls ausnahmsweise kein Editor vorhanden ist, einmalig herstellen.
|
||||||
Dim oControlId As Integer = oMeta.Guid
|
If oView.FocusedColumn.ColumnEdit Is Nothing Then
|
||||||
Dim oColumnName As String = oView.FocusedColumn.FieldName
|
RefreshGridDropdownSqlForCurrentColumn(oView)
|
||||||
|
MyValidationLogger.Debug($"[GridRefresh] QueryPopUp fallback assign for [{oView.FocusedColumn.FieldName}]")
|
||||||
Dim oRows = DT_GRID_COLUMNS_WITH_SQL.Select($"CONTROL_ID = {oControlId} AND SPALTENNAME = '{oColumnName.Replace("'", "''")}'")
|
Else
|
||||||
If oRows Is Nothing OrElse oRows.Length = 0 Then Exit Sub
|
MyValidationLogger.Debug($"[GridRefresh] QueryPopUp skip refresh for [{oView.FocusedColumn.FieldName}]")
|
||||||
|
End If
|
||||||
For Each oRow As DataRow In oRows
|
|
||||||
Dim oConnId As Integer = oRow.ItemEx("CONNECTION_ID", 1)
|
|
||||||
Dim oSql As String = oRow.ItemEx("SQL_COMMAND", String.Empty)
|
|
||||||
Dim oAdvancedLookup = oRow.ItemEx("ADVANCED_LOOKUP", False)
|
|
||||||
|
|
||||||
If String.IsNullOrWhiteSpace(oSql) Then Continue For
|
|
||||||
|
|
||||||
oSql = clsPatterns.ReplaceAllValues(oSql, PanelValidatorControl, True)
|
|
||||||
If String.IsNullOrWhiteSpace(oSql) OrElse clsPatterns.HasComplexPatterns(oSql) Then Continue For
|
|
||||||
|
|
||||||
Dim cacheKey = $"{oConnId}|{oSql}"
|
|
||||||
If _CachedSqlDataCache.ContainsKey(cacheKey) Then
|
|
||||||
_CachedSqlDataCache.Remove(cacheKey)
|
|
||||||
End If
|
|
||||||
|
|
||||||
Dim oDT = GetCachedDatatable(oSql, oConnId)
|
|
||||||
If oDT IsNot Nothing Then
|
|
||||||
ControlCreator.GridTables_CacheDatatableForColumn(oControlId, oColumnName, oSql, oConnId, oAdvancedLookup)
|
|
||||||
End If
|
|
||||||
Next
|
|
||||||
|
|
||||||
Catch ex As Exception
|
Catch ex As Exception
|
||||||
MyValidationLogger.Warn($"⚠️ [GridEditor_QueryPopUpRefreshSql] {ex.Message}")
|
MyValidationLogger.Warn($"⚠️ [GridEditor_QueryPopUpRefreshSql] {ex.Message}")
|
||||||
@@ -2472,6 +2638,16 @@ Public Class frmValidator
|
|||||||
|
|
||||||
Dim oControlId As Integer = oMeta.Guid
|
Dim oControlId As Integer = oMeta.Guid
|
||||||
Dim oFieldName As String = oView.FocusedColumn.FieldName
|
Dim oFieldName As String = oView.FocusedColumn.FieldName
|
||||||
|
|
||||||
|
' FIX: Zuerst prüfen ob GridTables bereits durch GridTables_HandleControlValueChange
|
||||||
|
' befüllt wurde (z.B. CTRL-abhängige SQL). Falls ja, direkt zuweisen und fertig.
|
||||||
|
If ControlCreator.GridTables.ContainsKey(oControlId) AndAlso
|
||||||
|
ControlCreator.GridTables(oControlId).ContainsKey(oFieldName) Then
|
||||||
|
oView.FocusedColumn.ColumnEdit = ControlCreator.GridTables(oControlId)(oFieldName)
|
||||||
|
MyValidationLogger.Debug($"[GridRefresh] ColumnEdit assigned from GridTables-Cache for [{oFieldName}]")
|
||||||
|
Return
|
||||||
|
End If
|
||||||
|
|
||||||
Dim oRows = ResolveGridSqlRows(oControlId, oFieldName)
|
Dim oRows = ResolveGridSqlRows(oControlId, oFieldName)
|
||||||
|
|
||||||
If oRows Is Nothing OrElse oRows.Length = 0 Then
|
If oRows Is Nothing OrElse oRows.Length = 0 Then
|
||||||
@@ -2922,10 +3098,21 @@ Public Class frmValidator
|
|||||||
Dim oDependingLookup As LookupControl3 = oControl
|
Dim oDependingLookup As LookupControl3 = oControl
|
||||||
Dim oValueToSet As String = oResultRow.ItemEx("SelectedValue", oControlCaption)
|
Dim oValueToSet As String = oResultRow.ItemEx("SelectedValue", oControlCaption)
|
||||||
|
|
||||||
|
' ========== NEU: Leerstring/Whitespace → Selektion löschen ==========
|
||||||
If String.IsNullOrWhiteSpace(oValueToSet) Then
|
If String.IsNullOrWhiteSpace(oValueToSet) Then
|
||||||
MyValidationLogger.Warn($"⚠️ [SetControlValues_FromControl] Lookup [{oControl.Name}]: Kein Wert zum Setzen.")
|
MyValidationLogger.Debug($"[SetControlValues_FromControl] Lookup [{oControl.Name}]: Leerwert → SelectedValues werden gelöscht.")
|
||||||
|
oDependingLookup.Properties.SelectedValues = New List(Of String)()
|
||||||
|
oMeta.IsDirty = True
|
||||||
|
If Not _listForceReindex.Contains(oControl.Name) Then
|
||||||
|
_listForceReindex.Add(oControl.Name)
|
||||||
|
End If
|
||||||
|
clsPatterns.UpdateControlInCache(oMeta.Name, New List(Of String)())
|
||||||
|
If Not changedControlNames.Contains(oControl.Name) Then
|
||||||
|
changedControlNames.Add(oControl.Name)
|
||||||
|
End If
|
||||||
Exit Select
|
Exit Select
|
||||||
End If
|
End If
|
||||||
|
' ========== ENDE NEU ==========
|
||||||
|
|
||||||
Dim valueMember As String = oDependingLookup.Properties.ValueMember
|
Dim valueMember As String = oDependingLookup.Properties.ValueMember
|
||||||
Dim valueExists As Boolean = False
|
Dim valueExists As Boolean = False
|
||||||
@@ -2956,10 +3143,21 @@ Public Class frmValidator
|
|||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
' ========== NEU: DataSource ist gesetzt, Wert fehlt trotzdem → Selektion löschen ==========
|
||||||
If Not valueExists Then
|
If Not valueExists Then
|
||||||
MyValidationLogger.Warn($"⚠️ [SetControlValues_FromControl] Lookup [{oControl.Name}]: Wert [{oValueToSet}] weiterhin nicht vorhanden.")
|
MyValidationLogger.Warn($"⚠️ [SetControlValues_FromControl] Lookup [{oControl.Name}]: Wert [{oValueToSet}] weiterhin nicht vorhanden → SelectedValues werden gelöscht.")
|
||||||
|
oDependingLookup.Properties.SelectedValues = New List(Of String)()
|
||||||
|
oMeta.IsDirty = True
|
||||||
|
If Not _listForceReindex.Contains(oControl.Name) Then
|
||||||
|
_listForceReindex.Add(oControl.Name)
|
||||||
|
End If
|
||||||
|
clsPatterns.UpdateControlInCache(oMeta.Name, New List(Of String)())
|
||||||
|
If Not changedControlNames.Contains(oControl.Name) Then
|
||||||
|
changedControlNames.Add(oControl.Name)
|
||||||
|
End If
|
||||||
Exit Select
|
Exit Select
|
||||||
End If
|
End If
|
||||||
|
' ========== ENDE NEU ==========
|
||||||
|
|
||||||
If oDependingLookup.Properties.SelectedValues Is Nothing Then
|
If oDependingLookup.Properties.SelectedValues Is Nothing Then
|
||||||
oDependingLookup.Properties.SelectedValues = New List(Of String)()
|
oDependingLookup.Properties.SelectedValues = New List(Of String)()
|
||||||
@@ -5850,9 +6048,6 @@ Public Class frmValidator
|
|||||||
' IDB-Pfad
|
' IDB-Pfad
|
||||||
If oValueType = "System.String" Then
|
If oValueType = "System.String" Then
|
||||||
oColValuesfromSource = Split(oValueFromSource.ToString, PMDelimiter)
|
oColValuesfromSource = Split(oValueFromSource.ToString, PMDelimiter)
|
||||||
If oColValuesfromSource.Length > 8 Then
|
|
||||||
MyValidationLogger.Warn("⚠️ [FillGridControlFromSource] Fill Grid Error - Max 8 columns can be configured!")
|
|
||||||
End If
|
|
||||||
Dim oRowData As New List(Of Object)
|
Dim oRowData As New List(Of Object)
|
||||||
For index = 1 To oColValuesfromSource.Length
|
For index = 1 To oColValuesfromSource.Length
|
||||||
If oDTColumnsPerDevExGrid.Rows.Count > (index - 1) Then
|
If oDTColumnsPerDevExGrid.Rows.Count > (index - 1) Then
|
||||||
|
|||||||
Reference in New Issue
Block a user