RAD Studio VCL Reference
ContentsIndex
PreviousUpNext
TDataSource.OnStateChange Event

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

Pascal
property OnStateChange: TNotifyEvent;
C++
__property TNotifyEvent OnStateChange;

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, a dataset's state changes frequently. For example, each time a user starts editing a field in a data-aware control the dataset's State property 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. 

 

Copyright(C) 2009 Embarcadero Technologies, Inc. All Rights Reserved.
What do you think about this topic? Send feedback!