Webeks.net - freelance programming
freelance programming - php, Joomla, Zend ...
Home :: Articles :: Programming :: ExtJs :: Simple ExtJS drop down list

Simple ExtJS drop down list

Written by Miha


I've just spent almost two hours trying to get simple drop down list into my ExtJS script. I would swear I've done it like it's done in an example on ExtJS page.

I was almost at the end of my nerves and I even considered to abandon ExtJs and go back to simple html where everything was much easier :)

Then ... like so many times before it "just started" to work !!!  :) Code that works is provided below.

var my_values = [
['one'],
['two'],
['three'],
['four'],
['five']
];


var numberField = new Ext.form.ComboBox({
fieldLabel: 'Number',
hiddenName: 'number',
store: new Ext.data.SimpleStore({
fields: ['number'],
data : my_values
}),
displayField: 'number',
typeAhead: true,
mode: 'local',
triggerAction: 'all',
emptyText:'Choose number...',
selectOnFocus:true
});

 


blog comments powered by Disqus