Official Content

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

Syntax

GridName.FirstPage()

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, Java, Angular.

Description

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

This method is available for:

whether the control has Base Table or not.

Nested grids support this method.

If the Web Panel / Panel that is being paged has filters, then the FirstPage method should be added within the user event that applies the filter, in order to avoid the displayed result correspondence with the page where it was previously located.

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

In Web Panels objects, this method may return some of the following values:

Value Result
0 Successful operation
1 The paging is not enabled in the grid

 

Samples

Event 'FirstPage'
    MyGrid.FirstPage()
EndEvent

In this example, when the end user presses the button associated with the 'FirstPage' event, the Grid / Free Style Grid / Tabular Grid will show the first group of records.

See Also

NextPage method
PreviousPage method
LastPage method
GotoPage method
RecordCount property
PageCount Property
Rows property
Grid paging on the Web

 

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