CGridView:GetMaxRow
The GetMaxRow method returns the 1-based index of the maximum grid row containing data. For example, although the CGridView may be created with 256 rows, suppose that only rows 1 through 26 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.
nMaxRow = CGridView:GetMaxRow()
Where nMaxRow is the index of the highest row containing data.
On failure, 0 is returned.
The following script returns the index of the last non-empty row containing data:
|
-- attach a grid on the Mira desktop |
|
-- return the 1-based index of the last row used |
Mira Pro x64 Script User's Guide, Copyright Ⓒ 2023 Mirametrics,
Inc. All Rights Reserved.