You sould add a property for the new column as follows:
// __LLBLGENPRO_USER_CODE_REGION_START AdditionalColumnProperties
internal DataColumn DecryptedDataColumn
{
get { return _columnDecryptedData; }
}
// __LLBLGENPRO_USER_CODE_REGION_END
// __LLBLGENPRO_USER_CODE_REGION_START CustomTypedViewRowCode
public System.String DecryptedData
{
get
{
if(IsNull(_parent.DecryptedDataColumn))
{
// return default value for this type.
return (System.String)TypeDefaultValue.GetDefaultValue(typeof(System.String));
}
else
{
return (System.String)this[_parent.DecryptedDataColumn];
}
}
set
{
this[_parent.DecryptedDataColumn] = value;
}
}
// __LLBLGENPRO_USER_CODE_REGION_END
Then in the Additional Fields user code region you should have:
// __LLBLGENPRO_USER_CODE_REGION_START AdditionalFields
// be sure to call _fields.Expand(number of new fields) first.
_fields.Expand(1);
// __LLBLGENPRO_USER_CODE_REGION_END
And move the rest of what you had into the InitClass code region:
// __LLBLGENPRO_USER_CODE_REGION_START InitClass
_columnDecryptedData = new DataColumn("DecryptedData", typeof(String), null, MappingType.Element);
_columnDecryptedData.ReadOnly = false;
_columnDecryptedData.Caption = @"DecryptedData";
this.Columns.Add(_columnDecryptedData);
// __LLBLGENPRO_USER_CODE_REGION_END
Leave your code in the AdditionalMembers & InitMembers code regions as they are.