Skip to main content

The "ds_grid_delete_row" Function

Syntax#

ds_grid_delete_row(id, row);
ArgumentTypeDescription
idds_gridThe data structure to remove a row from
rowintegerThe index of a row to remove

Description#

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

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

Example#

if (ds_grid_height(my_grid) > 1) {
ds_grid_delete_row(my_grid, 1);
}