This commit is contained in:
2022-03-16 11:09:50 +01:00
parent 0c0ed0b3a2
commit 6c4fac05e8
4 changed files with 199 additions and 185 deletions

View File

@@ -16,6 +16,7 @@ Imports DigitalData.GUIs.Common
Imports DigitalData.Modules.Logging
Imports DigitalData.Modules.EDMI.API.DatabaseWithFallback
Imports DigitalData.Modules.EDMI.API.Constants
Imports DigitalData.Modules.Language.DataTableEx
Public Class ClassControlCreator
@@ -956,24 +957,27 @@ Public Class ClassControlCreator
If Not IsNothing(pColumnsWithSqlAndControlPlaceholders) AndAlso pColumnsWithSqlAndControlPlaceholders.Rows.Count > 0 Then
For Each oRow As DataRow In pColumnsWithSqlAndControlPlaceholders.Rows
Try
Dim oSqlStatement = oRow.ItemEx("SQL_COMMAND", String.Empty)
Dim oConnectionId = oRow.ItemEx("CONNECTION_ID", -1)
Dim oControlId = oRow.Item("CONTROL_ID")
Dim oSqlStatement = oRow.Item("SQL_COMMAND")
Dim oConnectionId = oRow.Item("CONNECTION_ID")
Dim oColumnName = oRow.Item("SPALTENNAME")
Dim oAdvancedLookup = oRow.Item("ADVANCED_LOOKUP")
If Not IsDBNull(oSqlStatement) And Not IsDBNull(oSqlStatement) Then
If oSqlStatement <> String.Empty And oConnectionId > -1 Then
oSqlStatement = clsPatterns.ReplaceAllValues(oSqlStatement, pControlPanel, True)
GridTables_CacheDatatableForColumn(oControlId, oColumnName, oSqlStatement, oConnectionId, oAdvancedLookup)
' === Block to force setting the editor for GridColumns
Logger.Info("Force-setting Editor for all Gridcells..")
For Each oControl As Control In pControlPanel.Controls
Try
Dim oMeta = DirectCast(oControl.Tag, ClassControlCreator.ControlMetadata)
If oMeta.Guid = oControlId AndAlso TypeOf oControl Is GridControl Then
Dim oGrid As GridControl = DirectCast(oControl, GridControl)
DirectCast(oGrid.FocusedView, GridView).FocusInvalidRow()
Logger.Info("Force-setting Editor for Grid [{0}]", oGrid.Name)
Exit For
End If
Catch ex As Exception