CGrid:SetNumCols
The SetNumCols method specifies the number of columns in the current grid sheet. The number of columns may differ between sheets.
G:SetNumCols( nCols )
where
nCols is the number of columns to set in the grid.
The following script creates a grid and increases the number of columns at a later time:
|
-- new grid with 3 cols, 10 rows, 1 Sheet |
|
-- result: cols = 3 |
|
-- Select Sheet 3 (out of range) |
|
-- result: cols = 0 (sheet out of range) |
|
-- change to 8 columns |
|
-- result: cols = 8 |