FirstPage Method

Official Content
This documentation is valid for:

Takes the user to the first group of returned registers when the automatic paging of grids and freestyle grids is used.

Syntax

Grid.FirstPage()

Values:
0: Successful operation
1: The paging is not enabled in the grid

Description

This event is available when the grid has base table and when it does not. The 'Rows' property must have a value different from 0.  Grids may be nested. 
If the web panel which is being paged has filters, the FirstPage method should be added within the user event which applies the filter, so as to avoid that the displayed result corresponds to the page where it was previously located.

Note:
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 Enter
    MyGrid.FirstPage()
EndEvent

In this example when the user presses enter, the grid will show the first group of records.

Scope

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

See Also

NextPage Method
PreviousPage Method
LastPage Method
GotoPage Method
Recordcount Property
Pagecount Property
Rows property
Grid paging on the Web