dev-master
9999999-devyii2 Datatables
BSD-3-Clause
The Requires
- yiisoft/yii2 ~2.0.0
- bower-asset/datatables >= 1.9.4
- bower-asset/datatables-bootstrap3 *
- bower-asset/datatables-tabletools *
by horer
extension yii2
yii2 Datatables
yii2 Datatables, (*1)
The preferred way to install this extension is through composer., (*2)
Either run, (*3)
php composer.phar require --prefer-dist xinyeweb/yii2-datatables "*"
or add, (*4)
"xinyeweb/yii2-datatables": "*"
to the require section of your composer.json
file., (*5)
Once the extension is installed, simply use it in your code by :, (*6)
= DataTables::widget([ 'dataProvider' => $dataProvider, 'filterModel' => $searchModel, 'columns' => [ ['class' => 'yii\grid\SerialColumn'], //columns ['class' => 'yii\grid\ActionColumn'], ], ]);?>
'clientOptions' => [ "lengthMenu"=> [[20,-1], [20,Yii::t('app',"All")]], "info"=>false, "responsive"=>true, "dom"=> 'lfTrtip', "tableTools"=>[ "aButtons"=> [ [ "sExtends"=> "copy", "sButtonText"=> Yii::t('app',"Copy to clipboard") ],[ "sExtends"=> "csv", "sButtonText"=> Yii::t('app',"Save to CSV") ],[ "sExtends"=> "xls", "oSelectorOpts"=> ["page"=> 'current'] ],[ "sExtends"=> "pdf", "sButtonText"=> Yii::t('app',"Save to PDF") ],[ "sExtends"=> "print", "sButtonText"=> Yii::t('app',"Print") ], ] ] ],
yii2 Datatables
BSD-3-Clause
extension yii2