The "ds_grid_delete_col" Function

Syntax

ds_grid_delete_col(id, col);
ArgumentTypeDescription
idds_gridThe data structure to remove a column from
colintegerThe index of a column to remove

Description

Removes a column from the specified ds_grid while preserving other data.

When complete, ds_grid_width will be reduced by 1. For this reason, a column should only be deleted when there are at least two columns in the grid, otherwise the entire grid will be destroyed.

Example

if (ds_grid_width(my_grid) > 1) {
ds_grid_delete_col(my_grid, 1);
}