I have a combobox which looks like below
{
xtype:'combo',
fieldLabel:'Test',
store:['a','b']
}
Without creating Ext store object I am assigning the array to store and it is displaying the values fine.
At some action i want to update the store with ['d','e']
I have tried by assigning the new values to store like below
comboObje.store=['d','e'];
but it is not updating the values.
how to replace the orginal values with new values in the store.
You can create a new store using bindStore
or just load new data to the existing store using loadData
:
combo.store.loadData(['d', 'e'].map(function(item){ return [item]; }));
Working example: https://fiddle.sencha.com/#fiddle/tb1
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With