Show TOC

Values of Hidden Properties Updated as Null ValuesLocate this document in the navigation structure

To avoid hidden properties from being updated as null values.


Symptom: On selecting Submit Changes, properties that are hidden are updated as null.

Solution: Follow these steps:


  1. In the generated code, navigate to Start of the navigation path Excel Next navigation step Excel Manager End of the navigation path and open ExcelDataManager.cs file.
  2. Go to HandleUpdateRecords(DataRow datarow) function and add the following code after this.FillEntitiyWithData(entity, dataRow);:

var se = serviceContext.<CollectionName>.Where(p => p.<KeyName> == entity.<KeyName>).FirstOrDefault();

                if(entity.<KeyName> == se.<KeyName>)
                    if (entity.<HiddenPropertyName> == null && dataRow.ItemArray.Contains(entity.<HiddenPropertyName>) != true)
                        entity.<HiddenPropertyName> = se.<HiddenPropertyName>;
                    if (entity.<HiddenPropertyName2> == null && dataRow.ItemArray.Contains(entity.<HiddenPropertyName2>) != true)
                        entity.<HiddenPropertyName2> = se.<HiddenPropertyName2>;

  1. Save changes.