OverviewExamples
-- Change cell text for cell 10, 23
Grid.SetCellText("Grid1",10,23,"Hello, world.");
Sets the text of cell (10,23) in the "Grid1" grid object to "Hello, world."
-- Get the total Columns in the grid
ColumnCount = Grid.GetColumnCount("Grid1");
-- loop through each Column and add a numbered message
for i = 0, ColumnCount do
-- Set the text of the Columns
Grid.SetCellText("Grid1", 0, i, "Stats "..i, true);
end
-- Set auto size for all columns
Grid.AutoSizeColumns("Grid1", GVS_DEFAULT, true);
Labels all columns in the grid to 'Stats #' then resizes the Columns to fit the text
-- Get the value of 1,1
sValue = Grid.GetCellText("Grid1", 1, 1);
-- Convert it into an integer
nValue = String.ToNumber(sValue);
-- Do a calculation to it
nValue = nValue + 1;
-- Set the cell with the new value
Grid.SetCellText("Grid1", 1, 1, nValue, true);
Increments a cell that contains a number
See also: Related Actions