Reputation: 2480
xtype: 'combo',
id: 'example',
triggerAction: 'all',
forceSelection: true,
editable: false,
allowBlank: false,
fieldLabel: 'example',
mode: 'remote',
displayField:'name',
valueField: 'id',
store: Ext.create('Ext.data.Store', {
fields: [
{name: 'id'},
{name: 'name'}
],
//autoLoad: false,
proxy: {
type: 'ajax',
url: 'example.php',
reader: {
type: 'json',
root: 'rows'
}
}
}
})
,listeners: {
render: function(combo) {
combo.store().load(); // not working
}
}
If i using autoload: true
That work well. But I want to control my load and I using combo.store().load();
or Ext.getCmp('example').store.load();
in render function or by click a button. But everything not working.
How can i do that thanks
Upvotes: 0
Views: 14010
Reputation: 3263
Use (component ref).getStore().load();
like:
Ext.getCmp('example').getStore().load();
combo.getStore().load();
Upvotes: 1