Add virtual property to field value, improve ui when loading files, improve initial loading
This commit is contained in:
@@ -117,6 +117,8 @@ Public Class frmRowEditor
|
||||
End If
|
||||
|
||||
If oField.Value Is Nothing Then
|
||||
' TODO: Do we need to create a new field value here?
|
||||
' aka. do we need to configure fieldvalue from column settings
|
||||
oDict.Add(oColumnName, New FieldValue())
|
||||
Else
|
||||
oDict.Add(oColumnName, oField.Value)
|
||||
@@ -154,6 +156,10 @@ Public Class frmRowEditor
|
||||
Where(Function(f) f.Key = oRow.Item(COL_KEY)).
|
||||
SingleOrDefault()
|
||||
|
||||
' TODO: Why do we need to create new fieldvalues here?
|
||||
' aka. why would the be a value for which no fieldvalue exists yet?
|
||||
' If there are (non-virtual) fields in the template which do not have a value yet,
|
||||
' this might happen.
|
||||
If oField.Key Is Nothing Then
|
||||
oField = New KeyValuePair(Of String, FieldValue)(oRow.Item(COL_KEY), New FieldValue())
|
||||
End If
|
||||
@@ -173,10 +179,11 @@ Public Class frmRowEditor
|
||||
If Not oFieldValue.Final.Equals(oValueFromGrid) Then
|
||||
' If new value is not empty, any error will be removed.
|
||||
' Could cause problems in the future because a value might not equal to 'no error'.
|
||||
' 03.12.21: For now we always remove the error if ANYTHING changed about the field
|
||||
'If oValueFromGrid <> String.Empty Then
|
||||
' oFieldValue.Error = FieldError.None
|
||||
'End If
|
||||
|
||||
' 03.12.21: For now we always remove the error if ANYTHING changed about the field
|
||||
oFieldValue.Error = FieldError.None
|
||||
|
||||
' Save the grid value to the Field
|
||||
|
||||
Reference in New Issue
Block a user