diff --git a/code/GridFieldOrderableRows.php b/code/GridFieldOrderableRows.php index 0202bbc0..1fa28732 100755 --- a/code/GridFieldOrderableRows.php +++ b/code/GridFieldOrderableRows.php @@ -128,7 +128,7 @@ public function getManipulatedData(GridField $grid, SS_List $list) { $state->GridFieldOrderableRows->enabled = !$sorted; if(!$sorted) { - return $list->sort($this->getSortField()); + return $list->sort($this->getSortTable($list).'.'.$this->getSortField()); } else { return $list; } @@ -150,7 +150,7 @@ public function handleReorder($grid, $request) { $this->httpError(400); } - $items = $list->byIDs($ids)->sort($field); + $items = $list->byIDs($ids)->sort($this->getSortTable($list).'.'.$field); // Ensure that each provided ID corresponded to an actual object. if(count($items) != count($ids)) {