[Overview][Constants][Types][Classes][Procedures and functions][Variables][Index] Reference for unit 'DB' (#fcl)


Event triggered when values for calculated fields must be computed.


Source position: db.pas line 1759

public property TDataSet.OnCalcFields : TDataSetNotifyEvent
  read FOnCalcFields
  write FOnCalcFields;


OnCalcFields is triggered whenever the dataset needs to (re)compute the values of any calculated fields in the dataset. It is called very often, so this event should return as quickly as possible. Only the values of the calculated fields should be set, no methods of the dataset that change the data or cursor position may be called during the execution of this event handler. The frequency with which this event is called can be controlled through the TDataset.AutoCalcFields property. Note that the value of lookup fields does not need to be calculated in this event, their value is computed automatically before this event is triggered.

See also



How often should the value of calculated fields be calculated


Documentation generated on: Jun 22 2020