Takes the end user to the previous group of returned records when the automatic paging of Grids / Free Style Grids / Tabular Grids is used.
GridName.PreviousPage()
Where:
GridName
Is the name of the control to which the method is applied.
Controls: Grid, Free Style Grid, Tabular Grid
Generators: .NET, .NET Framework, Java, Angular
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.
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 |
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
FirstPage method
NextPage method
LastPage method
GotoPage method
Rows property
Grid paging on the Web