Skip to main content

On Sale: GamesAssetsToolsTabletopComics
Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
TagsGame Engines

Questions about grids

A topic by Robot Face created May 09, 2024 Views: 152 Replies: 3
Viewing posts 1 to 3
(+1)

Is there a way to disable sorting grids by clicking the label at the top? Or at least change the sort order? I have a grid I want to be editable, with many empty rows at the end so items can be added, and right now if I accidentally click the top all rows with content are sent to the bottom with no way to get them back to the top (as far as I can tell) except by manually editing the JSON/CSV.

Also, editing cells by double-clicking doesn't work on some grids, it just clears the cell and leaves it blank. I can't figure out why. As an example, on the "Grids" page of the tour, editing works fine on the table of fruit prices, but it deletes cells on the table of measures.

I've fixed my first problem by disabling column headers and replacing them with locked fields. Still struggling with the second.

Developer (2 edits) (+2)

You can disable (or alter) the sorting behavior by overriding the default "order" event handler; for example giving the grid a script like

on order do
end

For the record, the default handler currently looks like:

on order col do
 if !me.locked
  me.value:select orderby me.value[col] asc from me.value
 end
end

The cell-editing problem was reported by another user earlier today; this will be patched in the v1.42 release tomorrow. The problem is specifically caused by the default "changecell" handler not properly accounting for columns that don't have a format configured.

(+1)

Ah, thank you!