MoveToFirstRow - cCJGrid
Attempts to move to the first row in the grid
Type: Procedure
Syntax
Procedure MoveToFirstRow
Call Example
Send MoveToFirstRow
Description
MoveToFirstRow attempts to move to the first row of the grid. This is called when the Ctrl+Home key is pressed.
As with any row navigation, this requires that changes in the current row must be committed, cleared or the navigation canceled. See MoveToRow for a complete description of this process.
In a simple static grid (cCJGrid using a cCJGridDataSource), MoveToFirstRow will move to the first row in your current datasource.
Dynamic grids (cDbCJGrid using a cDbCJGridDataSource), will always make sure that the first record from the external data is loaded. A cDbCJGrid may be used in a static or non-static manner depending on the value of pbStaticData. When the cDbCJGrid is used in a non-static manner, MoveToFirstRow always ensures that you are getting the first record directly from the database.
This makes this a useful message to send when you have changed your constraints and you need to refresh your grid display.
When your cDbCJGrid is static, MoveToFirstRow only refreshes the grid if the grid is uninitialized (i.e., if it has been reset). If you wish to refresh a static cDbCJGrid before moving to the first row, you can do so by sending Reset to your data source object followed by a MoveToFirstRow.
Send Reset of (phoDataSource(Self))
Send MoveToFirstRow
If you have pbAutoSeed set to True in a cCJGridPromptList, you should not need to send MoveToFirstRow.
See Also
MoveDownRow | MoveUpRow | MovePageUp | MovePageDown | MoveToLastRow