title: ExtJS Replace Gridpanel Store
body: <p>Is there anyway to remotely override/replace a GridPanel's store?</p>
  
  <p>I have a grid that has a dummy store as I get an error if I don't declare as store:</p>
  
  <pre><code>this.ds is undefined
  </code></pre>
  
  <p>When my form is submitted, it makes a GET REST call &amp; loads a JSON store with the results. I want this store to be the store of my grid and show it underneath the formPanel.
  I can get it to show &amp; return JSON but can't seem to replace the store.</p>
  
  <p>I tried using
  searchGrid.store = formStore //the JSONStore returned from form submit</p>
  
  <p><strong>EDIT</strong>
  This if the data store:</p>
  
  <pre><code>var formStore = new Ext.data.JsonStore({
      proxy: new Ext.data.HttpProxy({
          url: '...',
          method: 'GET'
      }),
      root: 'Report',
      fields:[
              ....]
  });
  </code></pre>
  
  <p>This is the loading / changing of the store:</p>
  
  <pre><code>var data = this.getForm().getValues();
  
          formStore.load({
              params: {
                  fields: Ext.encode(data)
              }
          });
  
          var grid = Ext.getCmp('search');
  
          Ext.apply(grid, {store: formStore});
          grid.show();
  </code></pre>