dev-master
9999999-devBootstrap Grid Sort Column Enhanced Widget for Yii2 based on greshnik/yii2-grid-sort-column
BSD-3-Clause
The Requires
extension yii2 yii widget grid sort column
Bootstrap Grid Sort Column Enhanced Widget for Yii2 based on greshnik/yii2-grid-sort-column
based on greshnik/yii2-grid-sort-column, (*1)
The preferred way to install this extension is through composer., (*2)
Either run, (*3)
composer require alisherdavronov/yii2-grid-sort-column-enh "*"
or add, (*4)
"alisherdavronov/yii2-grid-sort-column-enh" : "*"
to the require section of your application's composer.json
file., (*5)
Example, (*6)
= GridView::widget([ 'dataProvider' => $dataProvider, 'filterModel' => $searchModel, 'columns' => [ ['class' => 'yii\grid\SerialColumn'], 'id', 'name', 'class', ['class' => 'yii\grid\ActionColumn'], ['class' => 'app\gridSortColumnEnh\SortColumn'], ], ]); ?>
Example add sort action in controller, (*7)
public function actions() { return [ 'swap' => [ 'class' => 'app\gridSortColumnEnh\Swap', 'model' => new Mark, 'attribute' => 'sortAttribute', ] ]; }
Example add behavior in model, (*8)
public function behaviors() { return [ 'sort' => [ 'class' => 'app\gridSortColumnEnh\SortBehavior', 'attribute' => 'sort', 'parentAttribute' => 'parentId', // optional ] ]; }
The BSD License (BSD). Please see License File for more information., (*9)
Bootstrap Grid Sort Column Enhanced Widget for Yii2 based on greshnik/yii2-grid-sort-column
BSD-3-Clause
extension yii2 yii widget grid sort column