-
22 Nov 2011 10:14 AM #1
Answered: Combobox does not show selected value
Answered: Combobox does not show selected value
I have a first combobox with a change event listener.
When the user selects a value in this first combobox, its change listener creates a second combobox (propiedad) and assigns it the following store:
The second combobox, when dropped-down, shows the options HOME and WORK properly, but when I click on either of these options, the combobox drops-up but remains empty, although I know that the value has been assigned through a alert(propiedad.value) in the change listener of this second combobox.Code:propiedad.store=Ext.create('Ext.data.Store', { fields: ['valor'], data : [{'valor':'HOME'},{'valor':'WORK'}] }); propiedad.displayField= 'valor'; propiedad.valueField= 'valor'; propiedad.setEditable(false);
¿Why the combobox does not show the selected value?Last edited by jfmateos2; 22 Nov 2011 at 10:15 AM. Reason: errata
-
Best Answer Posted by mitchellsimoens
You shouldn't change the valueField or displayField after instantiation.
-
22 Nov 2011 10:38 AM #2Sencha - Senior Forum Manager
- Join Date
- Mar 2007
- Location
- St. Louis, MO
- Posts
- 33,714
- Vote Rating
- 438
- Answers
- 3113
You shouldn't change the valueField or displayField after instantiation.
Mitchell Simoens @SenchaMitch
Sencha Inc, Senior Forum Manager
________________
http://www.JSONPLint.com - Source to lint your JSONP!
Check out my GitHub, lots of nice things for Ext JS 4 and Sencha Touch 2
https://github.com/mitchellsimoens
Think my support is good? Get more personalized support via a support subscription. https://www.sencha.com/store/
Need more help with your app? Hire Sencha Services services@sencha.com
Want to learn Sencha Touch 2? Check out Sencha Touch in Action that is almost in print!
When posting code, please use BBCode's CODE tags.


Reply With Quote