MINOR: better Config for inline editable grid

The docs should only provide such a basic, fully working example
This commit is contained in:
Zauberfisch 2013-02-12 07:40:19 +00:00
parent 0a4c2e2ed8
commit c9cd586544
1 changed files with 6 additions and 5 deletions

View File

@ -23,11 +23,12 @@ $grid = new GridField(
'ExampleGrid',
'Example Grid',
$this->Items(),
GridFieldConfig_RecordEditor::create()
->removeComponentsByType('GridFieldAddNewButton')
->removeComponentsByType('GridFieldDataColumns')
->addComponent(new GridFieldEditableColumns(), 'GridFieldEditButton')
->addComponent(new GridFieldAddNewInlineButton())
GridFieldConfig::create()
->addComponent(new GridFieldButtonRow('before'))
->addComponent(new GridFieldToolbarHeader())
->addComponent(new GridFieldEditableColumns())
->addComponent(new GridFieldDeleteAction())
->addComponent(new GridFieldAddNewInlineButton())
);
```