ComponentOne True DataControl 8.0
DefaultExpression Property

Specifies the expression used to calculate default field values on adding a new row.

Syntax

Field.DefaultExpression= variant

Remarks

Read/Write at run time and design time. Property applies to Field object.

This property determines the default value to be assigned to the field in a newly added record. When a new record is added to the Recordset, this expression is evaluated for every data field where it is not empty, and all such fields receive the default values obtained from the DefaultExpression evaluation. After this is done, the TData control evaluates calculated fields.

This expression belongs to the recordset level, meaning it can’t use field values, only constants, parameters and variables of the Master control if there is a master-detail relationship.

See True DataControl Fields for more information on fields.

See True DataControl Expressions for more information about expressions in general. Evaluation rules for DefaultExpression are as follows:

Expression Level: Recordset level

Synchronous Evaluation: Evaluated after a new record has been added to the recordset, before evaluating calculated fields.

Asynchronous Evaluation: No action.

 

 


Copyright (c) GrapeCity, inc. All rights reserved.

Product Support Forum  |  Documentation Feedback