Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

SilverStripe SortableGridField checkbox default

Tags:

silverstripe

The SortableGridField module enables drag 'n drop on GridFields. It comes with a checkbox at the top of every GridField to enable drag 'n drop.

SortableGridField

Is it possible to set the checkbox to checked by default? As an extra functionality to that, is it also possible to hide it?

like image 298
Semicolon Avatar asked Jun 23 '26 12:06

Semicolon


1 Answers

An alternative to the SortableGridField module is the GridFieldOrderableRows component in the SilverStripe Grid Field Extensions module.

GridFieldOrderableRows adds a permanent handle on the left of each GridField row without needing to check a reorder check box.

To enable the GridFieldOrderableRows component on a GridField we do the following:

$config->addComponent(new GridFieldOrderableRows('SortOrder'));
like image 90
3dgoo Avatar answered Jun 29 '26 00:06

3dgoo