code: public function getPreviousRecordID()
      {
          $map = $this->owner->gridField->getManipulatedList()->limit(PHP_INT_MAX, 0)->column('ID');
          $offset = array_search($this->owner->record->ID, $map);
          return isset($map[$offset-1]) ? $map[$offset-1] : false;
      }
docs: Gets the ID of the previous record in the list.
  WARNING: This does not respect the mutated state of the list (e.g. sorting or filtering).
  Currently the GridField API does not expose this in the detail form view.
  
  @todo  This method is very inefficient.
  @return int