EPUB | CHM | PDF

TDataSet.Properties.AutoCalcFields

Top Previous Next

Determines when the OnCalcFields event is triggered.

Syntax:

property AutoCalcFields: Boolean;

Description:

Set AutoCalcFields to control when the OnCalcFields event is triggered to update calculated fields during dataset processing. A calculated field is one that derives its value from the values of one or more fields in the active record, sometimes with additional processing.

If AutoCalcFields is True (the default), OnCalcFields is triggered when:

      • The dataset is opened.
      • The dataset is put into dsEdit state.
      • Focus moves from one visual control to another, or from one column to another in a data-aware grid and modifications were made to the record.
      • A record is retrieved from a database.

If an application permits users to change data, OnCalcFields is frequently triggered. In these cases an application may set AutoCalcFields to False to reduce the frequency with which AutoCalcFields is called. When AutoCalcFields is False, OnCalcFields is not called when changes are made to individual fields within a record.

See also: AutoRefresh