Open Tlopasha opened 7 years ago
is it possible to use MultiSelect widget as column in GridView ?
for example :
GridView::widget([ 'dataProvider' => $dataProvider, 'filterModel' => $searchModel, 'layout'=>"{items}", 'showOnEmpty' => true, 'columns' => [ [ 'attribute' =>'itemgroup_id', 'content' => function($data){ return $data->itemgroup->getTitle(); } , 'filter'=> MultiSelect::widget([ 'id'=>"multiXX", "options" => ['multiple'=>"multiple"], 'data' => [ 0 => 'super', 2 => 'natural'], 'value' => [ 0, 2], 'name' => 'multti', "clientOptions" => [ "includeSelectAllOption" => true, 'numberDisplayed' => 2 ], ])]>`
It shouldn't be a problem. But you need to set the filter to the widget. Here with the date: http://www.2amigos.us/blog/how-to-add-a-date-range-picker-to-filter-for-dates-on-a-gridview-for-yii2
is it possible to use MultiSelect widget as column in GridView ?
for example :