Data Access User Manual > Rogue Wave Views Data Access Common Framework > Data Sources and Gadgets > Data-Source-Aware Gadgets > IliDbNavigator
 
IliDbNavigator
IliDbNavigator is a gadget that lets the end user carry out certain actions on the data source. When a table is being edited via a form or table, the current row (record) is stored in a buffer (specified by IliTableBuffer). The end user is free to edit any of the values shown in the current record.
The IliDbNavigator Hierarchy and Example Gadget
Using the DbNavigator gadget, you can do the following:
*Change the current record ( back to the first record in the table, back to the previous record, forward to the next record, or forward to the last record in the table).
*Display the current row position in the data source or, if in query mode, display the current row position of the query .
*Display the number of rows in the data source or, if in query mode, display the number of rows of the query .
*Validate any entries that have changed in the current record (create in database) or apply query mode.
*Cancel any entries that have been made in the current record (create in database) or cancels query mode.
*Insert a new record , provided Allow Insert is activated.
*Delete current record .
*Clear the data source cache, update it by querying the database, and refresh the display .
*Clear the data source cache .
*Put the data source in query mode .
Note: Until you validate the changes that you have made in the current record, the values will not be updated in the database. The new values are actually stored at the data source in the table buffer. This leaves you the possibility of editing the complete record.
Adding a User Button to the Navigator
The following sample code shows how to add buttons to your DbNavigator to customize it for your needs. The new buttons here are called Print and Quit.
MyPanel::initialize()
{
IliDbNavigator* navig = ...;
 
// Add the buttons.
Navig->addButton(“P”, MyPrintCallback, “Print”, 2);
Navig->addButton(“Q”, MyQuitCallback, “Quit”, 1);
// Compute the position and width of the buttons.
Navig->adjustButtonsSize();
}

Version 6.3
Copyright © 2018, Rogue Wave Software, Inc. All Rights Reserved.