1. #1
    Ext JS Premium Member
    Join Date
    Jan 2008
    Posts
    9
    Vote Rating
    1
    Limech is on a distinguished road

      1  

    Default Combobox value other than in store not set

    Combobox value other than in store not set


    The value a combobox with a arraystore is set to does not get displayed.

    Ext.onReady(function(){

    var combo = Ext.create('Ext.form.ComboBox', {
    renderTo: Ext.getBody(),
    xtype: 'combo',
    forceSelection: false,
    fieldLabel: 'Label',
    store: [10,11,12]
    });

    combo.setValue(200);
    });


    The value of 200 is set but not displayed in the combo for a example see :
    http://jsfiddle.net/gxDKN/1/

    Am i doing something wrong or is this a bug ?

  2. #2
    Sencha User
    Join Date
    Oct 2011
    Location
    Ukraine
    Posts
    153
    Vote Rating
    6
    Romick is on a distinguished road

      0  

    Default


    It's becouse that value not in the combobox store. I think it''s normal behaviour of the store.
    Try combo.setValue(10); and it shoud works.

  3. #3
    Ext JS Premium Member
    Join Date
    Jan 2008
    Posts
    9
    Vote Rating
    1
    Limech is on a distinguished road

      0  

    Default


    But forceselection = false that should mean that it can have other values than the values present in the store..

    I noticed i posted it in RC1 but it works the same in 4.0.7. and rc1

  4. #4
    Sencha User
    Join Date
    Oct 2011
    Location
    Ukraine
    Posts
    153
    Vote Rating
    6
    Romick is on a distinguished road

      0  

    Default


    forceselection=false it mean that when user is typing he can leave field with display value 'B' but when set to true he cant and combo pick up value only from store. If trere are 'Blue' in store then it replace 'B' on 'Blue'. Also if user leave 'B' combobox getValue didn't changes.

Thread Participants: 1

film izle

hd film izle

film sitesi

takipci kazanma sitesi

takipci kazanma sitesi

güzel olan herşey

takipci alma sitesi

komik eğlenceli videolar