-
13 Feb 2008 9:45 AM #1
My Combobox doesn't work well.
My Combobox doesn't work well.
First, three choices "red", "brue" and "green" are displayed correctly.
But once something was selected, only one choices are displayed.
I expect three choices to be allways displayed.
Thanks.Code:Ext.onReady(function(){ var combo = new Ext.form.ComboBox({ store: new Ext.data.SimpleStore({ fields: ['code', 'value'], data : [ ['01', 'red'], ['02', 'green'], ['03', 'blue'] ] }), applyTo: 'combo-area', valueField:'code', displayField:'value', editable: false, mode: 'local' }) });
-
13 Feb 2008 2:19 PM #2
You need to add:
As a config option, and that should solve your issues.Code:triggerAction: 'all'

It's all to do with the behind-the-scenes filtering. When you select 'red' the ComboBox filters the store for 'red', so the other options are filtered out of the list.'Once again, fortune vomits on my eiderdown'
- Edmund Blackadder
-
13 Feb 2008 3:16 PM #3
http://extjs.com/forum/showthread.php?t=23038 <---- look herePHP Code:..........
applyTo: 'combo-area',
valueField:'code',
hiddenName : 'value', //<------- add
displayField:'value',
editable: false,
mode: 'local'
.........
http://extjs.com/deploy/dev/docs/out....ComboBox.html
-
13 Feb 2008 6:01 PM #4
-
14 Feb 2008 8:22 AM #5
Thank you for adequate advice.triggerAction: 'all'
The cause of the problem was it.


Reply With Quote
