Berechnung Spalten start

This commit is contained in:
Developer01
2026-02-10 17:40:15 +01:00
parent c2b3c023b9
commit 4898d25388

View File

@@ -57,7 +57,16 @@ Namespace ControlCreator
Case Else
oColumn.DataType = GetType(String)
End Select
Dim oFormulaExpression = ObjectEx.NotNull(oRow.Item("FORMULA_EXPRESSION"), String.Empty)
If oFormulaExpression <> String.Empty Then
Try
oColumn.Expression = oFormulaExpression
oColumn.ReadOnly = True
Catch ex As Exception
_Logger.Warn("⚠️ Invalid FORMULA_EXPRESSION for column {0}: {1}", oColumn.ColumnName, oFormulaExpression)
_Logger.Error(ex)
End Try
End If
oDataTable.Columns.Add(oColumn)
Next
@@ -179,6 +188,13 @@ Namespace ControlCreator
Dim oReadOnlyInt As Integer
oIsReadOnly = Integer.TryParse(oReadOnlyValue.ToString(), oReadOnlyInt) AndAlso oReadOnlyInt = 1
End If
Dim oFormulaExpression = ObjectEx.NotNull(oColumnData.Item("FORMULA_EXPRESSION"), String.Empty)
If oFormulaExpression <> String.Empty Then
oIsReadOnly = True
End If
oCol.OptionsColumn.AllowEdit = Not oIsReadOnly
Dim oColumnType As String = oColumnData.Item("TYPE_COLUMN")