addComponent(GridFieldButtonRow::create('before')); $this->addComponent(GridFieldAddNewButton::create('buttons-before-left')); $this->addComponent(GridFieldToolbarHeader::create()); $this->addComponent($sort = GridFieldSortableHeader::create()); $this->addComponent($filter = GridFieldFilterHeader::create()); $this->addComponent(GridFieldDataColumns::create()); $this->addComponent(GridFieldEditButton::create()); $this->addComponent(GridFieldDeleteAction::create()); $this->addComponent(GridField_ActionMenu::create()); $this->addComponent(GridFieldPageCount::create('toolbar-header-right')); $this->addComponent($pagination = GridFieldPaginator::create($itemsPerPage)); $this->addComponent(GridFieldDetailForm::create(null, $showPagination, $showAdd)); $sort->setThrowExceptionOnBadDataType(false); $filter->setThrowExceptionOnBadDataType(false); $pagination->setThrowExceptionOnBadDataType(false); $this->extend('updateConfig'); } }