Hi i am new in yii2.I was create one new module in my project using kartik widget.The module is working fine.
I has add new dropdown in the grid view. with dropdown search.
The dropdown values are shown but the particular
[
'attribute' => 'territory_type_id',
'label' => 'Territory',
'filterType' => GridView::FILTER_SELECT2,
'format' => 'raw',
'width' => '100px',
'filter' => ArrayHelper::map ( Territory::find ()->orderBy ( 'territory_name' )->asArray ()->all (), 'territory_type_id', 'territory_name' ),
'filterWidgetOptions' => [
'options' => [
'placeholder' => 'All...'
],
'pluginOptions' => [
'allowClear' => true
]
],
'value' => function ($model, $key, $index, $widget)
{
// var_dump($model->user);
// var_dump($model->customerType);
if (isset ( $model->territory ) && ! empty ( $model->territory->territory_name ))
return $model->territory->territory_name; ===>this place i am not getting corresponding territory name
}
],