data.getGridColsCount
Description
Get the number columns in a 2D array (grid).

Parameters
grid 2D array (in format [yRow][xCol])

Return value
colsCount integer

Example
-- create empty grid
local cells = data.createGrid()

-- add 2 cell values to grid (grid is automatically resized to 5 cols by 10 rows)
data.setCell(cells, 3, 9, "Hello")
data.setCell(cells, 4, 9, "World")

-- get and print columns count
local colsCount = data.getGridColsCount(cells)
print("Columns count: " .. colsCount)

Comments

See also
data.getGridRowsCount

Back