Results 1 to 2 of 2

Thread: Combobox does not show selected value

  1. #1
    Sencha User
    Join Date
    Nov 2011
    Posts
    3
    Vote Rating
    0
      0  

    Default 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:

    Code:
    propiedad.store=Ext.create('Ext.data.Store', {                                   
       fields: ['valor'],                                    
       data : [{'valor':'HOME'},{'valor':'WORK'}]
    });
    propiedad.displayField= 'valor';        
    propiedad.valueField= 'valor';
    propiedad.setEditable(false);
    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.

    Why the combobox does not show the selected value?
    Last edited by jfmateos2; 22 Nov 2011 at 10:15 AM. Reason: errata

  2. You shouldn't change the valueField or displayField after instantiation.

  3. #2
    Sencha User mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    40,050
    Answers
    3976
    Vote Rating
    1382
      0  

    Default

    You shouldn't change the valueField or displayField after instantiation.
    Mitchell Simoens @LikelyMitch
    Modus Create, Senior Frontend Engineer
    ________________
    Need any sort of Ext JS help? Modus Create is here to help!

    Check out my GitHub:
    https://github.com/mitchellsimoens

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •