Compare commits
1 Commits
master
...
Release-Sp
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
4898d25388 |
@@ -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")
|
||||
|
||||
Reference in New Issue
Block a user