title: How to use search button for gridview
body: <p>Sorry for my english!!
  I need your help. I wantto make filtering and search by clicking on button. So, first, I enter a name or age, or both, and then click on the button, and table appears with data that has already been filtered.If all fields are empty and the button is not pressed, then the table should not be visible. The table appears only after clicking. (I'm using database)</p>
  <p>Here's my fields for filter and button:</p>
  <pre><code>&lt;div class=&quot;search&quot;&gt;
  &lt;?php
  echo $form-&gt;field($data, 'name')-&gt;textInput();
  echo $form-&gt;field($data, 'age')-&gt;textInput();
  ?&gt;
  &lt;/div&gt;
  &lt;?= Html::submitButton('search'); ?&gt;
  </code></pre>
  <p>And my gridview:</p>
  <pre><code>&lt;div class=&quot;gridview&quot;&gt;
          &lt;?= GridView::widget([
              'dataProvider' =&gt; $dataProvider,
              'columns' =&gt; [
                  ['class' =&gt; 'yii\grid\SerialColumn'],
                  'name',
                  'age',
          ]); ?&gt;
      &lt;/div&gt;
  </code></pre>
  <p>What i need to write in my controller? I don't understand, i really want to get it!!
  Thanks everyone for your attention!!</p>