CGrid:GetNumSheets


The GetNumSheets method returns the number of sheets in the grid. The default grid opens with 1 sheet.

Syntax

nSheets = G:GetNumSheets()

where

    nSheets is the number of sheets to set in the grid. On failure 0 is returned.

Example

Suppose a CGrid G already exists and the number of sheets is not known. The following script determines if the grid has less than 3 sheets:

if G:GetNumSheets() < 3 then

-- if fewer than 3 sheets

     --

-- do something

end

 

Related Topics

SetNumSheets

SelectSheet

CGrid class