You're a lucky one!! I had the same problem... and binding the store everytime you load it was the solution in the forum... but didn't work for me. Perhaps you should try this:
PHP Code:
var storeCountries = Ext.create('Ext.data.Store', {
id: 'storeCountries',
model: 'modelCtrSk',
remoteSort: false,
remoteFilter: false,
remoteGroup:false,
proxy: {
type: 'ajax',
url: 'queryHarvestAreaAction.do?accion=loadCountries',
reader: {
type: 'json',
root: 'registers'
}
},
autoLoad: false
});
tmpStore.load({
scope:this,
callback:function(records, operation, success){
if(success){
//"countries" it's a itemselector
var tmpCountries = Ext.getCmp('countries');
tmpCountries.clearValue();
if(tmpCountries.store.getCount()>0){
//Remove elements from "From Available BindList"
tmpCountries.fromField.store.removeAll();
}
//copy from data loaded from my principal store to the ItemSelector's main store
tmpCountries.store.add(storeCountries.getRange());
//Also copy data to Available Item Store
tmpCountries.fromField.store.add(storeCountries.getRange());
}
}
});
Voila!!! works for me.