title: Extjs 4. Grid loadData with Pagination
body: <p>My grid store has a default <code>pageSize</code> property. On the server side I return <code>totalProperty</code> parameter. So, pagination is working correctly. But, I've just built a custom filter which is supposed to specify different parameters of the grid, including <code>pageSize</code>. And this is not working. In fact, I do not know how to redifine store <code>pageSize</code> when using <code>loadData</code> function. The whole function which reloads grid looks like this</p>
  
  <pre><code>var grid=Ext.getCmp('grid'),
  frm=Ext.getCmp('remotefilter').getForm(); // this form contains grid
  // parameters which can be redifined by user     
  frm.submit({
    url:'../json/grid.php', // this code returns grid data, based on parameters
    submitEmptyText:false,
    success:function(form,action){
      var json=Ext.decode(action.response.responseText,1);
      grid.getStore().loadData(json['items']);
      // I guess, here I should specify new pageSize somehow
      // I can grasp a new value of pageSize from the form above
    }
  }); 
  </code></pre>
  
  <p><strong>EDIT</strong></p>
  
  <p>I also tried to do this just before invoking <code>loadData</code>:</p>
  
  <pre><code>grid.store.pageSize=newlimit;       
  Ext.getCmp('pagingToolbar').pageSize=newlimit;
  </code></pre>
  
  <p>But it does not help</p>