2017 © Pedro Peláez
 

yii2-extension yii2-sortable-grid-view-widget

Sortable modification of standard Yii2 GridView widget

image

rezident/yii2-sortable-grid-view-widget

Sortable modification of standard Yii2 GridView widget

  • Sunday, March 13, 2016
  • by rezident
  • Repository
  • 0 Watchers
  • 0 Stars
  • 12 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 32 Forks
  • 0 Open issues
  • 5 Versions
  • 0 % Grown

The README.md

Sortable GridView Widget for Yii2

Sortable modification of standard Yii2 GridView widget., (*1)

Installation

The preferred way to install this extension is through composer., (*2)

  • Either run
php composer.phar require --prefer-dist "rezident/yii2-sortable-grid-view-widget" "*"

or add, (*3)

"rezident/yii2-sortable-grid-view-widget" : "*"

to the require section of your application's composer.json file., (*4)

  • Add to your database new unsigned int attribute, such sortOrder., (*5)

  • Add new behavior in the AR model, for example:, (*6)

use rezident\sortablegrid\SortableGridBehavior;

public function behaviors()
{
    return [
        'sort' => [
            'class' => SortableGridBehavior::className(),
            'sortableAttribute' => 'sortOrder'
        ],
    ];
}
  • Add action in the controller, for example:
use rezident\sortablegrid\SortableGridAction;

public function actions()
{
    return [
        'sort' => [
            'class' => SortableGridAction::className(),
            'modelName' => Model::className(),
        ],
    ];
}

Usage

  • Use SortableGridView as standard GridView with sortableAction option. You can also subscribe to the JS event 'sortableSuccess' generated widget after a successful sorting.
  • Use not-sortable class for row to disable sorting for this row

The Versions

13/03 2016

dev-master

9999999-dev

Sortable modification of standard Yii2 GridView widget

  Sources   Download

MIT

The Requires

 

by Yuri Nazarenko

yii2 widget grid sortable gridview

13/03 2016

1.0.9

1.0.9.0

Sortable modification of standard Yii2 GridView widget

  Sources   Download

MIT

The Requires

 

by Yuri Nazarenko

yii2 widget grid sortable gridview

12/03 2016

1.0.8

1.0.8.0

Sortable modification of standard Yii2 GridView widget

  Sources   Download

MIT

The Requires

 

by Yuri Nazarenko

yii2 widget grid sortable gridview

13/10 2015

1.0.7

1.0.7.0

Sortable modification of standard Yii2 GridView widget

  Sources   Download

MIT

The Requires

 

yii2 widget grid sortable gridview

27/01 2015

1.0.6

1.0.6.0

Sortable modification of standard Yii2 GridView widget

  Sources   Download

MIT

The Requires

 

yii2 widget grid sortable gridview