TDBNavigator provides users a simple control for navigating through records in a dataset, and for manipulating records. The navigator consists of a series of buttons that enable a user to scroll forward or backward through records one at a time, go to the first record, go to the last record, insert a new record, update an existing record, post data changes, cancel data changes, delete a record, and refresh record display.
The following figure shows the navigator that appears by default when you place it on a form at design time. The navigator consists of a series of buttons that let a user navigate from one record to another in a dataset, and edit, delete, insert, and post records. The VisibleButtons property of the navigator enables you to hide or show a subset of these buttons dynamically. See Choosing Navigator Buttons to Display for more information.
The following table describes the buttons on the navigator.
TDBNavigator buttons
Button |
Purpose |
First |
Calls the dataset's First method to set the current record to the first record. |
Prior |
Calls the dataset's Prior method to set the current record to the previous record. |
Next |
Calls the dataset's Next method to set the current record to the next record. |
Last |
Calls the dataset's Last method to set the current record to the last record. |
Insert |
Calls the dataset's Insert method to insert a new record before the current record, and set the dataset in Insert state. |
Delete |
Deletes the current record. If the ConfirmDelete property is True it prompts for confirmation before deleting. |
Edit |
Puts the dataset in Edit state so that the current record can be modified. |
Post |
Writes changes in the current record to the database. |
Cancel |
Cancels edits to the current record, and returns the dataset to Browse state. |
Refresh |
Clears data control display buffers, then refreshes its buffers from the physical table or query. Useful if the underlying data may have been changed by another application. |
See Displaying fly-over Help for information on associating help hints with each button. See Using a Single Navigator for Multiple Datasets for information about associating a navigator with multiple datasets.
Copyright(C) 2008 CodeGear(TM). All Rights Reserved.
|
What do you think about this topic? Send feedback!
|