TcxDBNavigatorButtons Class
This class represents the collection of buttons used in database navigator controls.
Declaration
TcxDBNavigatorButtons = class(
TcxCustomNavigatorButtons
)
Remarks
In contrast to non-db buttons, the TcxDBNavigatorButtons class works with the dataset. This class provides the default action functionality for processing dataset records.
The following table displays default indexes and hints for buttons contained in the collection, and describes functionality provided by them.
Button Name | Default Index | Default Hint | Description |
---|---|---|---|
NBDI_FIRST | Moves the cursor to the first dataset record. | ||
NBDI_PRIORPAGE | Moves the cursor to the previous dataset page. | ||
NBDI_PRIOR | Moves the cursor to the previous dataset record. | ||
NBDI_NEXT | Moves the cursor to the next dataset record. | ||
NBDI_NEXTPAGE | Moves the cursor to the next dataset page. | ||
NBDI_LAST | Moves the cursor to the last dataset record. | ||
NBDI_INSERT | Inserts a new record into the connected dataset. | ||
NBDI_APPEND | Appends a new record into the connected dataset. | ||
NBDI_DELETE | Deletes the current record from the connected dataset. | ||
NBDI_EDIT | Sets the connected dataset into edit state. | ||
NBDI_POST | Saves the modified record to the connected dataset. | ||
NBDI_CANCEL | Cancels all the unsaved modifications to the current record of the connected dataset. | ||
NBDI_REFRESH | Fetches data from the dataset to update the data view in the appropriate control. | ||
NBDI_SAVEBOOKMARK | Saves a bookmark for the connected dataset. | ||
NBDI_GOTOBOOKMARK | Moves the cursor to the previously saved bookmark in the connected dataset. | ||
NBDI_FILTER | Invokes the Filter Dialog for the managed dataset. | ||
Any custom button | The default index is assigned automatically, starting from NavigatorButtonCount. | Empty string. You can specify a hint text via a button’s Hint property. | No predefined action. As with default buttons, you can handle a button collection’s OnButtonClick event to perform any actions associated with custom buttons. |
You can modify the button behavior as required using any of the following methods:
Handle a button collection’s OnButtonClick event;
Inherit from TcxDBNavigatorButtons and override the DoButtonClick method.
To dynamically change the accessibility of buttons, override the GetButtonEnabled method or switch a button’s Enabled property.
For more information on how to customize button settings, refer to the TcxNavigatorButton and TcxNavigatorCustomButton class descriptions.