CGrid:GetNumRows
The GetNumRows method returns the number of rows in the current grid sheet. The number of rows may differ between sheets.
nRows = G:GetNumRows()
where
nRows is the number of rows in the current sheet. On failure, 0 is returned.
The following script creates a grid and increases the number of rows at a later time:
|
-- new grid with 3 cols, 10 rows, 1 sheet |
|
-- result: Rows = 10 |
|
-- Select Sheet 3 (out of range) |
|
-- result: Rows = 0 (sheet out of range) |
|
-- change to 6 rows |
|
-- result: Rows = 6 |