Skip to content

MoveToLastRow - cCJGrid

Attempts to move to the last row in the grid

Type: Procedure

Syntax

Procedure MoveToLastRow

Call Example

Send MoveToLastRow

Description

MoveToLastRow attempts to move to the last row of the grid. This is called when the Ctrl+End 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), MoveToLastRow will move to the last row in your current datasource.

Dynamic grids (cDbCJGrid using a cDbCJGridDataSource), will always make sure that the last 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, MoveToLastRow always ensures that you are getting the last 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, MoveToLastRow 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 MoveToLastRow.

Send Reset of (phoDataSource(Self))
Send MoveToLastRow

See Also

MoveDownRow | MoveUpRow | MovePageUp | MovePageDown | MoveToFirstRow