Official Content

Sets the number of records to be loaded by the Grid or Free Style Grid in Web Panels and Panels, or the number of empty lines in Transactions Grids.

Syntax

control. Rows = number

Values

Any positive number or zero (Unlimited).

Effects of Rows = 0 (Unlimited)

The effect of Rows = 0 (Unlimited) is the following:

  • Rows = 0 (Unlimited) in Web Panels as well as in Panels, indicates that there will be as many lines displayed as records resulting from the associated query.
  • The 0 value in Transactions indicates that there will be no empty lines in the grid.

Default values

Object Default Value  
Transactions 5 Indicates the number of empty lines to be shown on the grid.
Web Panels and Panels 0 (Unlimited) Indicates the number of records to be loaded in the grid. Zero means all the records.

Scope

Generators: .NET, .NET Framework, Android, Apple, Java
Controls: Grid, Free Style Grid

Description

When Rows is set to a value different than zero (unlimited), it's assumed that some type of paging is going to be implemented for the grid. Paging type can be automatic or manual

For mobile apps, Infinite scrolling is always performed and the Rows property determines the page size of the grid which is brought to the client. Data is brought to the client on demand, as the user swipes (up or down) in the grid.

For Web applications, when the Rows property is set to a value different than zero (unlimited), the Paging is enabled, so the user can decide if the grid will show paging buttons or if it will perform Infinite scrolling. Infinite scrolling is supported for the Abstract Layout only.

Runtime/Design time

This property applies both at runtime and at design time.

Samples

Example: adding lines to a web transaction's grid

To allow the end user to enter lines one by one in a web transaction, you can set this property by combining it with the AddLines method at execution time, as follows:

Event Start
    if &Mode = 'INS'
        Grid1.Rows = 1
    else    // &Mode = UPD / DLT / DSP
        Grid1.Rows = 0
    endif
EndEvent

Event 'AddLines'
    Grid1.AddLines(1)
EndEvent  // 'Addlines'

Then, the end user can press the AddLines button in Insert Mode to add empty lines one by one to the Transaction.

See Also

HowTo: Configure Infinite Scrolling in web applications
Infinite scrolling

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