First, add GridFieldOptionSet.php
to your project, and get it working on the Job list in the client detail view.
You will need to work out yourself how to add the component to the GridField.
-
Add a configuration method, setComponentsToDisableOnSort(), that can be given a list of components to disable instead of being hard-coded to GridFieldSortableRows.
-
Switch from the undefinedoffset module to the grid sorter provided in silverstripe-australia/gridfieldextensions. Use (1) to preserve the current functionality.
-
Update the module to list a number of buttons for each sortable column, instead of hard-coding. The following methods might help:
$gridField->getColumns(); $gridField->getColumnMetadata($columnField); $gridField->getList(); $dataList->canSortBy($columnField));
-
Make the button sort on reverse order after the second click.