From RAD Studio API Documentation
Jump to: navigation, search


property OnStateChange: TNotifyEvent read FOnStateChange write FOnStateChange;


__property System::Classes::TNotifyEvent OnStateChange = {read=FOnStateChange, write=FOnStateChange};


Type Visibility Source Unit Parent
event published
Data.DB TDataSource


Occurs when the state of the dataset of a data source component changes.

Write an OnStateChange event handler to take specific actions when the State property changes for a dataset associated with a data source component.

During the course of a normal connection to a database, the state of a dataset changes frequently. For example, each time a user starts editing a field in a data-aware control the State property of the dataset is changed from dsBrowse to dsEdit if the State is not already dsEdit. An OnStateChange event handler can respond to changes in state by taking actions such as disabling or enabling menu items or buttons.

See Also