sortablegridfield/README.md

19 lines
599 B
Markdown
Raw Normal View History

2012-05-09 19:13:49 +02:00
SortableGridField
=================
2012-05-09 19:31:28 +02:00
Adds drag and drop functionality to SilverStripe 3.0's GridField
## Usage
To enable sorting on a has_many relationship set up an interger field on your data object.
2012-05-09 19:31:28 +02:00
To enable drag and drop sorting on the grid field add the following to your grid field's config
2012-05-09 19:31:28 +02:00
*Grid Field Config*
2012-05-09 19:39:14 +02:00
:::php
2012-05-17 03:41:14 +02:00
$myGridConfig->addComponent(new GridFieldSortableRows('{Column to store sort}'));
To move an item to another page drag the row over the respective page button and release.
## @TODO
* Optimize re-ordering of a has_many relationship when sorting on a single page