CGridCtrl:GetMaxRow, CGridView:GetMaxRow


The GetMaxRow method returns the 1-based index of the maximum grid row containing data. For example, although the CGridCtrl may be created with 64 rows, suppose that only rows 1 through 26 might contain data. In this example, the method returns 26. The ToTable method uses this process internally to limit the returned 1-dimensional array with values that are numbers. to the maximum column and row containing data.

Syntax

nMaxRow = CGridCtrl:GetMaxRow()

bullet.gif    Where nMaxRow is the index of the highest row containing data.

bullet.gif    On failure, 0 is returned.

Example

The following script returns the index of the last non-empty row containing data:

V = attach_gridview()

-- attach a grid on the Mira desktop

G = new_gridctrl(V)

-- create a CGridCtrl for the window

nMaxRow = G:GetMaxRow()

-- return the 1-based index of the last row used

Related Topics

CGridCtrl class

GetMaxCol

GetNumRows

SetNumRows

ToTable


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