CGridView:GetNumRows


The GetNumRows method returns the number of grid rows. Note that the number of rows is buffered to a multiple of 256. For example, if you request 50 rows using the GridParams table at the time of creation, the grid will actually get 256 rows. Similarly, creating the grid with 260 rows will result in a grid having 512 rows. To determine the maximum non-blank row containing data, use GetMaxRow.

Syntax

nRows = CGridView:GetNumRows()

bullet.gif    Where nRows is the number of rows in the grid.

bullet.gif    On failure, 0 is returned.

Example

The following script returns the number of rows in a grid window:

G = attach_gridview()

-- attach the top-most grid window

nRows = G:GetNumRows()

-- return the number of rows

Related Topics

CGridView class, GetNumCols, GetMaxRow, GetNumSheets, SetNumRows


Mira Pro x64 Script User's Guide, Copyright Ⓒ 2023 Mirametrics, Inc. All Rights Reserved.