0
votes

First i create a gird panel with {store:store1, column:column1} ;

I add ftype: 'search' component to grid panel,

then i use grid.reconfigure(store2,column2) to change the store and column.

after that , i found when i click the search button , ext use the store1 to request,

so my question is how to reconfigure the search component like the xtype: 'pagingtoolbar''s method bindStore(store2)?

1

1 Answers

1
votes

you should do that afterrender the view in controller I added a button in my code here in pagingtoolbar
I have gridpanel called customerShippingAddressesFormGrid so I add new button to it's pagingtoolbar and I added a listener when i click on it to add new row to my gridpanel

 customerShippingAddressesFormGrid.pagingToolbar.add(
        new Ext.button.Button(
        {
           xtype: 'button',
           itemId: 'addButton',
           icon: 'Images/Lists_New.png',
           text: this.addButtonText,
           tooltip: this.addNewText,
           scope: this,
           listeners:
           {
              click: function ()
              {
                 if (customerIDFormList.comboBox.getValue())
                 {
                    var customerShippingAddressStore = customerShippingAddressesFormGrid.getStore();
                    customerShippingAddressStore.add({});
                 }
              }
           }
        }));