diff --git a/code/Company.php b/code/Company.php index 36e7589..26cd2ff 100644 --- a/code/Company.php +++ b/code/Company.php @@ -39,11 +39,11 @@ class Company extends DataObject { $config = new GridFieldConfig(); $config->addComponent(new GridFieldAddExistingAutocompleter('Name')); - $config->addComponent(new GridFieldDefaultColumns()); + $config->addComponent(new GridFieldDataColumns()); $config->addComponent(new GridFieldSortableHeader()); $config->addComponent(new GridFieldPaginator()); $config->addComponent(new GridFieldDeleteAction()); - $config->addComponent(new GridFieldRemoveButton()); + $config->addComponent(new GridFieldDeleteAction(true)); $config->addComponent(new GridFieldDetailForm()); $gridField = new GridField('Employees', 'Employees', $this->Employees(), $config); diff --git a/code/GridFieldTestPage.php b/code/GridFieldTestPage.php index a76d90d..9bc3a8b 100644 --- a/code/GridFieldTestPage.php +++ b/code/GridFieldTestPage.php @@ -32,7 +32,7 @@ class GridFieldTestPage extends Page { $fields = parent::getCMSFields(); $config = new GridFieldConfig(); - $config->addComponent(new GridFieldDefaultColumns()); + $config->addComponent(new GridFieldDataColumns()); $config->addComponent(new GridFieldSortableHeader()); $config->addComponent(new GridFieldPaginator); $config->addComponent(new GridFieldFilterHeader()); @@ -43,7 +43,7 @@ class GridFieldTestPage extends Page { $fields->addFieldToTab('Root.NoRelation', $grid); $config = new GridFieldConfig(); - $config->addComponent(new GridFieldDefaultColumns()); + $config->addComponent(new GridFieldDataColumns()); $config->addComponent(new GridFieldSortableHeader()); $config->addComponent(new GridFieldPaginator); $config->addComponent(new GridFieldFilterHeader()); @@ -54,7 +54,7 @@ class GridFieldTestPage extends Page { $fields->addFieldToTab('Root.HasMany', $grid); $config = new GridFieldConfig(); - $config->addComponent(new GridFieldDefaultColumns()); + $config->addComponent(new GridFieldDataColumns()); $config->addComponent(new GridFieldSortableHeader()); $config->addComponent(new GridFieldPaginator); $config->addComponent(new GridFieldFilterHeader()); @@ -87,7 +87,7 @@ class GridFieldTestPage_Controller extends Page_Controller { */ public function Form(){ $config = new GridFieldConfig(); - $config->addComponent(new GridFieldDefaultColumns()); + $config->addComponent(new GridFieldDataColumns()); $config->addComponent(new GridFieldSortableHeader()); $config->addComponent(new GridFieldPaginator); $config->addComponent(new GridFieldFilterHeader());