Takes the end user to a specific group of records, when the automatic paging of Grids / Free Style Grids / Tabular Grids is used.
GridName.GotoPage(page-number)
Where:
GridName
Is the name of the control to which the method is applied.
page-number
Is a numeric value that indicates the number of the specific page to which the method will take the end user.
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 other than 0), the GotoPage method allows accessing a specific group of records.
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 has good response times without paging, 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 |
In this example, there is a Grid (GSearchResults) with the result of a search, and another one (GPages) with the number of pages of the first one in a Web Panel Web Layout.
Event Refresh
&PageCounts = GSearchResults.PageCount
EndEvent
Event GPages.Load
if &PageCounts > 1
&Count = 1
Do while &Count <= &PageCounts
&PageNumber = &Count
GPages.Load()
&Count += 1
EndDo
EndIf
EndEvent
Event &PageNumber.Click
GSearchResults.GotoPage(&PageNumber)
EndEvent
FirstPage method
NextPage method
LastPage method
PreviousPage method
Rows property
Grid paging on the Web