public function getColumnContent($grid, $record, $col) { // In case you are using GridFieldEditableColumns, this ensures that // the correct sort order is saved. If you are not using that component, // this will be ignored by other components, but will still work for this. $sortFieldName = sprintf('%s[GridFieldEditableColumns][%s][%s]', $grid->getName(), $record->ID, $this->getSortField()); $sortField = new HiddenField($sortFieldName, false, $record->getField($this->getSortField())); $sortField->addExtraClass('ss-orderable-hidden-sort'); $sortField->setForm($grid->getForm()); return ViewableData::create()->customise(array('SortField' => $sortField))->renderWith('GridFieldOrderableRowsDragHandle'); }