PDA

View Full Version : Adding Select Options to Combo With out Store



ExtJSNewUser
11 Nov 2009, 6:05 PM
I need some help. Can we add values (Select options ) to the ExtJs Combo box in the code, not from the Store. sometimes we might need 2 or three values where we do not want to bring them from database, and not create a complete local store for these two values. is there any way we can add the valueField and displayField like

var combo=new Ext.form.Combobox({
all the config options
})

combo.add('valueField1','displayField1');
combo.add('valueField2','displayField2'); etc

any help form the Furum members is highly appreciated

VinylFox
11 Nov 2009, 7:09 PM
Take a look at the ComboBox docs a bit closer, the store config will accept an array of data.

ExtJSNewUser
12 Nov 2009, 6:48 AM
I knew it accepts a store. i want to avoid a store just for two values