PreviousPage Method

Official Content
This documentation is valid for:

Takes the user to the previous group of returned registers when the automatic paging of Grids and freestyle Grids is used

Syntax

Grid.PreviousPage()

Values

0: Successful operation
1: The paging is not enabled in the Grid
2: Already in the first page

Description

Is available when the Grid has base table and when it does not. The 'Rows' property must has a value different from 0.  Grids may be nested. 

This method efficiency is associated to the efficiency of the definition of the corresponding Grid navigation.  I.e.: if the Grid without paging has good response times, these times will be similar with paging.

Example

Event Back.click
    &err = MyGrid.PreviousPage()
    If &err = 2
       Message.Caption = ‘You already are in the first page’
     EndIf
EndEvent

Scope

Objects: Web Panels
Controls: Grids, Free Style Grids
Languages: .NET, Java, Ruby (up to GeneXus X Evolution 3)

See Also

FirstPage
NextPage
LastPage
GotoPage Method
Rows property
Grid paging on the Web