0
votes

i am new using Extjs 4.2.1. I have a main controller where i want to SET a combobox initial value when Init method is load. I had did this:

init: function(){

var suc =  Ext.data.StoreManager.lookup('ListaSucursales');
//suc.load();
console.log(suc.getCount());

} 

I had noticed that this store has 0 items. It means that the store was not loaded althought its autoLoad property is true. So my question is. Where i must Set the combobox initial value using the controller.

Thank you in advance...

1

1 Answers

1
votes

You can set the combobox value on store load like this:

   store.load({
         callback:function(records, operation, success){
             // set combo value
         }
    });