这是旧代码,但无论如何。。。
I am trying to filter a store, and listen to the event in a comboBox, so I can refresh it. My doQuery event didnt work, ( well actually it did work, but returned random result sets, leaving an overall wtf feeling )
config.store.filterBy(function Filter(record){
//this works
if (record.data.field != ""){
return true;
}
else {return false;}
});
However this does not automagically update the combobox. So I tried various versions of
cbx = new Ext.getCmp(this);
debugger; //scope right here
this.getStore().on("datachanged",function refresh(){
cbx.reset();// store s scope
});
但cbx的范围似乎总是商店,而不是组合框。
有人知道如何将存储中数据更改事件的侦听器添加到comboBox中吗?