PDA

View Full Version : ExtJS 4.1 modify a combobox item list(adding/removing items)



Leprosy
17 Jul 2014, 1:06 PM
I was searching the docs and can't found a consistent and easy way to change a combobox item list. I've used combo.getStore().add(...) and combo.getStore().removeAll() but the widget doesn't update. How can I achieve this?


PS : I have this combobox in a Ext.grid.Panel, using the CellEditing plugin.

Leprosy
17 Jul 2014, 1:39 PM
I'm using this:

combo.getStore().add({text: "text", value: "value"});

and:


combo.getStore().removeAll().

The
combo.getStore().data reflects the changes but when I click on the combobox again, the store data is returned to the initial state.(same items, none of the changes remain)

Leprosy
20 Aug 2014, 1:45 PM
Well, thanks for all the responses XD

chamacs
20 Aug 2014, 1:58 PM
Have you tried adding:


queryMode (http://docs.sencha.com/extjs/4.0.7/#!/api/Ext.form.field.ComboBox-cfg-queryMode) : 'local'

and


queryCaching (http://docs.sencha.com/extjs/4.1.1/#!/api/Ext.form.field.ComboBox-cfg-queryCaching) : false