Rows property

Official Content
This documentation is valid for:
Allows setting the number of records to be loaded by the grid or free style grid in Web and SD Panels, or the number of empty lines in Web transactions.

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 SD panels, indicates that there will be as many lines displayed as records resulting from the associated query.
  • The 0 value in Web 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 SD Panels 0 (Unlimited) Indicates the number of records to be loaded in the grid. Zero means all the records.

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 SD 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 Property for grids 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.

Run-time/Design-time

This property applies both at run-time 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.

Scope

Objects: Transaction, Web Panel
Platforms: Web(.Net, Java), Smart Devices(Android, IOS)
Controls: FreeStyle Grid, Grid

See Also

HowTo: Configure Infinite scrolling in web applications
Infinite scrolling