title: Yii2 - dropDownList filter outside GridView
body: <p>I have a kartik\GridView in the view, </p>
  
  <p><a href="https://i.stack.imgur.com/9ywZ0.png" rel="nofollow noreferrer">GridView</a></p>
  
  <p>Actually, added a dropDownList on the toolbar</p>
  
  <p><a href="https://i.stack.imgur.com/gzuxS.png" rel="nofollow noreferrer">GridView with dropdownlist</a></p>
  
  <p>But I need the dropDownList as a filter option for status [solicitudes_status], how can I achieve that?. Thank you.</p>
  
  <pre><code>$statusAll = TblEstatus::find()-&gt;all();
  $statusArray = ArrayHelper::map($statusAll, 'estatus_id', 'estatus_descripcion');
  
  $searchModel = new TblSolicitudesSearch();
  $dataProvider = $searchModel-&gt;search(Yii::$app-&gt;request-&gt;queryParams);
  
  
  &lt;?= GridView::widget([
      'dataProvider' =&gt; $dataProvider,
      'filterModel' =&gt; $searchModel,
      'columns' =&gt; [
        'solicitudes_solicitud',
        'solicitudes_dependencia_destino_id',
        'solicitudes_dependencia_tipoapoyo_id',
        'solicitudes_status',
        [
          'attribute' =&gt; 'solicitudes_status',
          'filter'    =&gt; [ 1=&gt;"Nuevos", 2=&gt;"Atendiendo", 3=&gt;"Terminados" ]
        ],
  
        ['class' =&gt; 'yii\grid\ActionColumn'],
      ],
      'toolbar' =&gt;  [
          ['content'=&gt;
          Html::dropDownList('status_list_drop', 'null', $statusArray, ['data-pjax'=&gt;0, 'class' =&gt; 'form-control']),
        ],
      ],
      'pjax' =&gt; true,
      'bordered' =&gt; true,
      'striped' =&gt; false,
      'condensed' =&gt; false,
      'responsive' =&gt; true,
      'hover' =&gt; true,
      'floatHeader' =&gt; false,
      'showPageSummary' =&gt; false, 
      'panel' =&gt; [
          'type' =&gt; GridView::TYPE_DEFAULT
      ],
  ]); ?&gt;
  </code></pre>