The "ds_grid_insert_col" Function
Syntax#
| Argument | Type | Description |
|---|---|---|
id | ds_grid | The data structure to insert a row into |
col | integer | The index of the new column to insert |
[value] | real/string | Optional: A value to assign to all new cells (default 0) |
Description#
Adds a new column to a ds_grid at the given index, shifting any columns that follow. Optionally also sets a value for empty new cells in the grid (default value is 0).
When complete, ds_grid_width will be increased by 1. For this reason, the new column index can be input as less than or equal to the current value of ds_grid_width.

X1