5

I want to set a column title for the sort column (in $summary_fields) for a GridField.

I can't seem to do something like:

static $summary_fields = array('Reorder' => 'Sort');

Although I can use the $summary_fields method to change the order of the columns, I can't use it to set a title for the sort column.

I am using the GridFieldOrderableRows component from the SilverStripe Grid Field Extensions Module.

GridField column title screenshot example

3dgoo
  • 15,716
  • 6
  • 46
  • 58
helenclarko
  • 269
  • 1
  • 12

1 Answers1

6

This is now possible. We can set the column heading by setting the Reorder label in the $field_labels variable:

private static $field_labels = array(
    'Reorder' => 'Sort'
);
3dgoo
  • 15,716
  • 6
  • 46
  • 58