title: Zend Framework 1, Bvb Grid, resultset is filtered only for the current page
body: <p>I have reached very strange problem using Zend Framework 1 and binding the resultset to BvbGrid.</p>
  
  <p>We have a method which queries an external API. You need to specify the following params: <em>methodName</em>, <em>params</em>.</p>
  
  <p>So the controller recieves a resultset as an array from the external API.</p>
  
  <p>The resultset (in the database) is 4 columns - 1 string, 2 DateTime, 3 int, 4 int. And is with about 3000 rows.</p>
  
  <p>When I recieve the resultset in the controller I bind it to Bvb Grid, which should evaluate in the view as columns with search boxes.</p>
  
  <p><strong>So far, so good, when I search in the first or in the last column (string, int), it searches in the whole resultset.</strong></p>
  
  <p><strong>But when I search 2, 3 (DateTime, int) it searches only in the current page.</strong></p>
  
  <p>I don't understand why is that. There is no difference in data binding, or something.</p>
  
  <p>The code is as follows</p>
  
  <pre><code>public function indexAction() {
  
      $pagesize = $this-&gt;_request-&gt;getPost('rows');
      $pagenum = $this-&gt;_request-&gt;getPost('page');
  
      $pagesize = ($pagesize) ? $pagesize : 30;
      $pagenum = ($pagenum) ? $pagenum : 1;
  
      $params = array();
      $params['page_num'] = $pagenum;
      $params['page_limit'] = $pagesize;
  
      if ($this-&gt;_request-&gt;isXmlHttpRequest()) {
          // additional search filter
          if ($this-&gt;_request-&gt;getPost('username')) {
              $params['username'] = $this-&gt;_request-&gt;getPost('username');
          }
          if ($this-&gt;_request-&gt;getPost('lastlogin')) {
              $params['lastlogin'] = $this-&gt;_request-&gt;getPost('lastlogin');
          }
          if ($this-&gt;_request-&gt;getPost('type')) {
              $params['type'] = $this-&gt;_request-&gt;getPost('type');
          }
          if ($this-&gt;_request-&gt;getPost('level')) {
              $params['level'] = $this-&gt;_request-&gt;getPost('level');
          }
      }
      if (($order_by = $this-&gt;_request-&gt;getPost('sidx')) &amp;&amp; ($order_type = $this-&gt;_request-&gt;getPost('sord'))) {
          $params['order_by'] = $order_by;
          $params['order_by_type'] = $order_type;
      }
  
  
      $resultset = $this-&gt;web_service-&gt;_apiRequest('SearchUsers', $params);
  
  
      /**
       * The resultset is like
       * array(
          'found_rows' =&gt; 3000,
          'body'       =&gt; array(
                              'username'  =&gt; 'blabla',
                              'lastlogin' =&gt; '2014-02-25 13:33:38.1234',
                              'type'      =&gt; 1,
                              'level'     =&gt; 199
                          )
        );
       */
      $this-&gt;view-&gt;count = $resultset['found_rows'];
  
      if ($resultset['found_rows'] &gt; 0 || $this-&gt;_request-&gt;isXmlHttpRequest()) {
          $grid = new Bvb_Grid_Deploy_JqGrid($this-&gt;_gridconfig);
          $grid-&gt;setSource(new Bvb_Grid_Source_Array($resultset['body']));
          $grid-&gt;getSource()-&gt;setTotalRecords($resultset['found_rows']);
          $grid-&gt;updateColumn('username', array('width' =&gt; '110',));
          $grid-&gt;updateColumn('lastlogin', array('width' =&gt; '110',));
          $grid-&gt;updateColumn('type', array('width' =&gt; '110',));
          $grid-&gt;updateColumn('level', array('width' =&gt; '110',));
          $grid-&gt;setJqgParams(array('caption' =&gt; 'resultset'
              , 'forceFit' =&gt; true
              , 'viewrecords' =&gt; true
              , 'rowList' =&gt; array(15, 30, 50)
              , 'altRows' =&gt; false
                  )
          );
  
          $grid-&gt;ajax(get_class($grid));
          $grid-&gt;setNumberRecordsPerPage(30);
          $grid-&gt;setExport(array());
          $this-&gt;view-&gt;grid = $grid-&gt;deploy();
  }
  </code></pre>
  
  <p>I have tried to examine the BvbGrid's code, but found nothing strange.</p>
  
  <p>In another project the same code is used, and it works fine, without any problems on searching in any column. I have dump'd the API response to be sure it gives me 3000 records, and it actually is and they are in the way as in the comment. I really cannot find the reason why i.e. the lastlogin column searches only on the current page.</p>
  
  <p>If someone can help me, or give me directions where to look at to fix the issue (maybe somewhere in the BvbGrid's code?) I will appreciate it.</p>
  
  <p>Thank you in advance.</p>