1. #1
    Sencha User
    Join Date
    Dec 2009
    Posts
    364
    Vote Rating
    2
    raj_plays is on a distinguished road

      0  

    Question cannot populate Combo with dynamic array

    cannot populate Combo with dynamic array


    Hi, I am trying to populate an Ext.form.ComboBox using a dynamically created 2 - d array.
    Whereas a static 2 - d array like the one below works
    Code:
    var messageTypecombo = new Ext.form.ComboBox({
        allowBlank: false,
        typeAhead: true,
        triggerAction: 'all',
        store: new Ext.data.SimpleStore({
            fields: ['value', 'name'],
            data: [
                [0, 'Station Promo'],
                [1, 'Program Promo'],
                [2, 'Sponsor']
            ]
        }),
        mode: 'local',
        displayField: 'name',
        valueField: 'value'
    });
    The dynamic array like the one below does not. It displays only a 0 in the combo box
    Code:
    var messageTypesArr = [];
    messageTypesArr.push([0, 'Station Promo']);
    messageTypesArr.push([1, 'Program Promo']);
    messageTypesArr.push([2, 'Sponsor']);
    Code:
    
    var messageTypecombo = new Ext.form.ComboBox({
        allowBlank: false,
        typeAhead: true,
        triggerAction: 'all',
        store: new Ext.data.SimpleStore({
            fields: ['value', 'name'],
            data: messageTypesArr
        }),
        mode: 'local',
        displayField: 'name',
        valueField: 'value'
    });
     


    Please help


  2. #2
    Sencha User
    Join Date
    Dec 2009
    Posts
    364
    Vote Rating
    2
    raj_plays is on a distinguished road

      0  

    Default


    Found the error.
    I was trying to pouplate the combo before the dynamic array had been loaded.
    Silly me.

    Dear Admin, please delete this thread

Turkiyenin en sevilen filmlerinin yer aldigi xnxx internet sitemiz olan ve porn sex tarzi bir site olan mobil porno izle sitemiz gercekten dillere destan bir durumda herkesin sevdigi bir site olarak tarihe gececege benziyor. Sitenin en belirgin ozelliklerinden birisi de Turkiyede gercekten kaliteli ve muntazam, duzenli porno izle siteleri olmamasidir. Bu yuzden iste. Ayrica en net goruntu kalitesine sahip adresinde yayinlanmaktadir. Mesela diğer sitelerimizden bahsedecek olursak, en iyi hd porno video arşivine sahip bir siteyiz. "The Best anal porn videos and slut anus, big asses movies set..." hd porno faketaxi