2012-05-09 10:13:49 -07:00
|
|
|
SortableGridField
|
|
|
|
=================
|
|
|
|
|
2012-05-09 14:31:28 -03:00
|
|
|
Adds drag and drop functionality to SilverStripe 3.0's GridField
|
|
|
|
|
|
|
|
## Usage
|
2012-05-10 11:27:01 -03:00
|
|
|
To enable sorting on a has_many relationship set up an interger field on your data object.
|
2012-05-09 14:31:28 -03:00
|
|
|
|
2012-05-10 11:27:01 -03:00
|
|
|
To enable drag and drop sorting on the grid field add the following to your grid field's config
|
2012-05-09 14:31:28 -03:00
|
|
|
*Grid Field Config*
|
2012-05-09 14:39:14 -03:00
|
|
|
|
|
|
|
:::php
|
2012-05-10 11:27:01 -03:00
|
|
|
$myGridConfig->addComponent(new GridFieldSortableRows('{Column to store sort}'));
|