TcxDBNavigatorButtons.GetButtonEnabled(Integer) Method
Gets the button state according to the dataset status.
Declaration
function GetButtonEnabled(ADefaultIndex: Integer): Boolean; override;
Parameters
Name | Type |
---|---|
ADefaultIndex | Integer |
Returns
Type |
---|
Boolean |
Remarks
The GetButtonEnabled method defines the conditions when a navigator button is enabled.
All buttons are disabled if the database navigator is not connected to a dataset.
The First, Prior, and PriorPage buttons are enabled when the dataset’s Bof property is False.
The Last, Next, and NextPage buttons are enabled when the dataset’s Eof property is False.
The Insert button is enabled when the dataset’s CanModify property is True.
The Delete button is enabled when the dataset’s CanModify property is True and dataset contains at least one record.
The Edit button is enabled when the dataset’s CanModify property is True and the dataset is not in edit mode.
The Post and Cancel buttons are enabled when the CanModify property is True and the dataset is in edit mode.
The GotoBookmark button is enabled when there is a previously saved bookmark.
The Refresh button is enabled when the dataset’s CanModify property is True.
The ADefaultIndex parameter specifies the button whose status is checked.