diff --git a/code/GridFieldOrderableRows.php b/code/GridFieldOrderableRows.php index e8e96e9e..9d5a6bd0 100755 --- a/code/GridFieldOrderableRows.php +++ b/code/GridFieldOrderableRows.php @@ -190,7 +190,7 @@ public function getManipulatedData(GridField $grid, SS_List $list) { $sortterm = $this->extraSortFields.', '; } } - $sortterm .= $this->getSortField(); + $sortterm .= $this->getSortTable($list).'.'.$this->getSortField(); return $list->sort($sortterm); } else { return $list; @@ -226,7 +226,7 @@ public function handleReorder($grid, $request) { $sortterm = $this->extraSortFields.', '; } } - $sortterm .= $field; + $sortterm .= $this->getSortTable($list).'.'.$field; $items = $list->filter('ID', $ids)->sort($sortterm); // Ensure that each provided ID corresponded to an actual object.