IModelMember.IsCalculated Property

Specifies whether or not the custom field is calculated.

Namespace: DevExpress.ExpressApp.Model

Assembly: DevExpress.ExpressApp.v18.1.dll


[ModelBrowsable(typeof (ModelMemberVisibilityCalculator))]
[ModelReadOnly(typeof (ModelMemberReadOnlyCalculator))]
bool IsCalculated { get; set; }


Type Description

true, when the custom field is calculated; otherwise - false.

The IsCalculated property is visible in the Model Editor for custom fields only.

To define a calculated field, set the IsCalculated property to true and pass the expression used to compute this field value to the IModelMember.Expression property.

To define a persistent field, set the IsCalculated property to false. Note that creation of custom persistent fields is allowed at design time only, by default (the IsCalculated property is not editable at runtime). To allow end users to add custom persistent fields at runtime, set the ModelMemberReadOnlyCalculator.AllowPersistentCustomProperties static property to true. To allow updating the database schema after a field is added at runtime, set the XafApplication.DatabaseUpdateMode property to UpdateDatabaseAlways. A column mapped to the current field will be added to the database table automatically.


Generally, persistent fields should be added only at design time. It is a bad practice to allow and users to alter the database schema - allow this only as a last resort.