From RAD Studio API Documentation
Jump to: navigation, search


property OnChange: TFieldNotifyEvent read FOnChange write FOnChange;


__property TFieldNotifyEvent OnChange = {read=FOnChange, write=FOnChange};


Type Visibility Source Unit Parent
event published
Data.DB TField


Occurs immediately after the data in the field is written to the record buffer.

Write an OnChange event handler to respond to any changes in the field's data. OnChange allows a response once the data has been successfully written to the record buffer.

When writing the value of a field to the current record buffer, the following steps occur:

  1. The OnValidate event handler is called to validate the data.
  2. If the OnValidate event handler accepts the current Value, the data is written to the record buffer.
  3. If writing the data does not raise an exception, the OnChange event handler is called to allow a response to the change.
Note: OnChange does not fire if TDataSet.State= dsSetKey or TDataSet.State = dsFilter.

OnChange is an event handler of type Data.DB.TFieldNotifyEvent.

See Also