1. #1
    Sencha User
    Join Date
    Oct 2012
    Posts
    17
    Answers
    1
    Vote Rating
    0
    Madiyana is on a distinguished road

      0  

    Default Answered: Combobox List - Virgin Line

    Answered: Combobox List - Virgin Line


    Hello ,
    Before starting I am sorry with my english.. I don't speak it well ..
    So I have a problem with the Combobox in ExtJS4 .. I tried to add a virgin line in my combobox list but It's not ok .. Now i have the list with a virgin line but when I trie to select it I can't.. so if someone can help me or have an example pliz
    Code:
    Ext.require([
        'Ext.form.*',
        'Ext.data.*',
        'Ext.tip.QuickTipManager'
    ]);
    
    
    Ext.onReady(function() {
        Ext.QuickTips.init();
    
    
          var form = Ext.create('Ext.form.Panel', {
            renderTo: 'docbody',
            title   : ' ',
            autoHeight: true,
            width   : 600,
            bodyPadding: 10,
            defaults: {
                anchor: '100%',
                labelWidth: 100
            },
            items   : [
                        {
                            xtype : 'fieldcontainer',
                            combineErrors: true,
                            msgTarget: 'side',
                            fieldLabel: ' Name',
                            items : [
                                {
                                    width:          50,
                                    xtype:          'combo',
                                    mode:           'local',
                                    triggerAction:  'all',
                                    forceSelection: true,
                                    editable:       false,
                                     selectOnFocus : true,
                                    name:           'title',
                                    displayField:   'name',
                                    valueField:     'value',
                                    tpl: '<tpl for="."><div class="x-combo-list-item">{name:defaultValue("--")}</div></tpl>',
                                    queryMode: 'local',
                                    store:          Ext.create('Ext.data.Store', {
                                        fields : ['name', 'value'],
                                        data   : [
                                            {name : 'Mvr',   value: 'mr'},
                                            {name : 'Mrs',  value: 'mrs'},
                                            {name : 'Miss', value: 'miss'}
                                        ],
                                        listeners :
                                            {
                                            'load' : function (store, records, options) {
                                                this.insert(0,'--');        
                                            }}
                                    })
                                }
                            ]
                        }
                    ]
        
        });
    });

  2. Remove the tpl and change the insert to:

    Code:
    this.insert(0, {name:'--', value:'--'});

  3. #2
    Sencha Premium Member skirtle's Avatar
    Join Date
    Oct 2010
    Location
    UK
    Posts
    3,585
    Answers
    540
    Vote Rating
    319
    skirtle has a brilliant future skirtle has a brilliant future skirtle has a brilliant future skirtle has a brilliant future skirtle has a brilliant future skirtle has a brilliant future skirtle has a brilliant future skirtle has a brilliant future skirtle has a brilliant future skirtle has a brilliant future skirtle has a brilliant future

      0  

    Default


    Remove the tpl and change the insert to:

    Code:
    this.insert(0, {name:'--', value:'--'});

  4. #3
    Sencha User
    Join Date
    Oct 2012
    Posts
    17
    Answers
    1
    Vote Rating
    0
    Madiyana is on a distinguished road

      0  

    Default


    Thank you .. It works ..

Thread Participants: 1

Tags for 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