Open lugaru90 opened 8 years ago
'columns' => [ [ 'class' => 'yii\grid\CheckboxColumn', 'checkboxOptions' => function ($model) { return [ 'value' => $model->id, ]; }, ],
Getting an error when trying to add a CheckboxColumn:
Uncaught TypeError: jQuery(...).yiiGridView is not a function
i'm fix, modify DataTablesBootstrapAsset.php and add yii.gridview.js (from vendor > yiisoft > yii2 > assets) move to datatables-bootstrap3 > BS3 > assets > js
Has no one found a cleaner solution ?
[solved]
In view :
use yii\grid\GridViewAsset;
and call this :
GridViewAsset::register($this);
Does not work with ['class' => 'yii\grid\CheckboxColumn']. yiigridview is not defined