Official Content

Takes the end user to the previous group of returned records when the automatic paging of Grids / Free Style Grids / Tabular Grids is used.

Syntax

GridName.PreviousPage()

Where:

GridName
    Is the name of the control to which the method is applied.

Scope

Controls: Grid, Free Style GridTabular Grid
Generators: .NET, .NET Framework, JavaAngular

Description

When the automatic paging of a particular Grid is used (its Rows property must be set to a value different from 0), and automatic paging buttons are also provided, if, for any reason, you do not want to use those buttons, or any of them, and you want to define a specific paging action, you can then use the PreviousPage method as well as others related.

This method is available for:

whether the control has Base Table or not.

Nested grids support this method.

This method's efficiency relates to the efficiency of the definition of the corresponding grid navigation. In other words, if the Grid without paging has good response times, then such times will be similar to when you have paging.

Values

For Web Panel objects, this method may return some of the following values:

Value Result
0 Successful operation
1 The paging is not enabled in the grid
2 Already on the first page

Samples

The following code may be defined in a Web Panel and MyGid is a Grid or a Free Style Grid. When working with Tabular Grids no values are returned.

Event 'Back'                      //Back is the name of a control included in the screen.
    &err = MyGrid.PreviousPage()
    If &err = 2
       msg('You already are in the first page')
     EndIf
EndEvent

See Also

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


Last update: February 2024 | © GeneXus. All rights reserved. GeneXus Powered by Globant