简体   繁体   English

Ext4如何重新配置​​组件“ ftype:search”

[英]Ext4 How to reconfigure the component “ftype:search”

First i create a gird panel with {store:store1, column:column1} ; 首先,我用{store:store1,column:column1}创建一个网格面板;

I add ftype: 'search' component to grid panel, 我在网格面板中添加了ftype: 'search'组件,

then i use grid.reconfigure(store2,column2) to change the store and column. 然后我使用grid.reconfigure(store2,column2)更改存储和列。

after that , i found when i click the search button , ext use the store1 to request, 之后,当我点击search按钮时,我发现ext使用store1请求,

so my question is how to reconfigure the search component like the xtype: 'pagingtoolbar' 's method bindStore(store2) ? 所以我的问题是如何重新配置​​搜索组件,如xtype: 'pagingtoolbar' '的方法bindStore(store2)

you should do that afterrender the view in controller I added a button in my code here in pagingtoolbar 您应该这样做,然后在控制器中渲染视图。我在我的代码中在pageingtoolbar中的此处添加了一个按钮
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的网格面板,所以我向它的pageingtoolbar添加了新按钮,并且当我单击它以向网格面板中添加新行时添加了一个侦听器

 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({});
                 }
              }
           }
        }));

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM