在界面上创建时,先过滤掉数据
var cityStore=Ext.create('Tpshop.store.member.ComboSupplierCity');
cityStore.on("load",function(store,records,options){});
bombobox创建
xtype : 'combobox',
id:'edit-supplier-form-city',
typeAhead: true,
triggerAction: 'all',
queryMode: 'remote',
displayField: 'name',
valueField: 'area_id',
selectOnTab: true,
store:cityStore,
editable: false,
hidden:true,
width:100,
listeners:{
focus:function(combo, record,index){
var province_id=Ext.getCmp('edit-supplier-form-province').value;
cityStore.clearFilter();
cityStore.filterBy(function(record){
return record.get('parent_id') == province_id;
});
},
select:function(){
Ext.getCmp('edit-supplier-form-area').setVisible(true);
Ext.getCmp('edit-supplier-form-area').clearValue();
}