1. #1
    Ext User
    Join Date
    Jan 2009
    Posts
    61
    Vote Rating
    2
    venu is on a distinguished road

      0  

    Default How to set combo in PropertyGrid

    How to set combo in PropertyGrid


    I just going through the PropertyGrid example came with Ext 3.0.

    I am trying to add a Combo box to the Property Grid but it is not working.

    Here is my code
    ------------------
    Code:
    Ext.onReady(function(){
        var propsGrid = new Ext.grid.PropertyGrid({
            el:'props-grid',
            nameText: 'Properties Grid',
            width:300,
            autoHeight:true,
            viewConfig : {
                forceFit:true,
                scrollOffset:2 // the grid will never have scrollbars
            }
        });
    
        propsGrid.render();
        
        var comboCategory = new Ext.form.ComboBox({
                fieldLabel    : 'Category',
                name            : 'category',
                allowBlank     : false,
                store            : ['Business', 'Personal'],
                typeAhead    : true,
                mode        : 'local',
                triggerAction: 'all'
        });
    
        propsGrid.setSource({
            "(name)": "Properties Grid",
            "grouping": false,
            "autoFitColumns": true,
            "productionQuality": false,
            "created": new Date(Date.parse('10/15/2006')),
            "tested": false,
            "version": 0.01,
            "borderWidth": 1,
            "Category": new Ext.grid.GridEditor(new Ext.form.TextField({
                        allowBlank : true
            }))
        });
    
    });
    But the Category field is not displayed and also i see no error.

    Anyone let me know where i am going wrong?

    Thanks,
    venu

  2. #2
    jay@moduscreate.com's Avatar
    Join Date
    Mar 2007
    Location
    Frederick MD, NYC, DC
    Posts
    16,353
    Vote Rating
    79
    jay@moduscreate.com is a name known to all jay@moduscreate.com is a name known to all jay@moduscreate.com is a name known to all jay@moduscreate.com is a name known to all jay@moduscreate.com is a name known to all jay@moduscreate.com is a name known to all

      0  

    Default


    source is meant for a name : value data set.

  3. #3
    Ext User
    Join Date
    Jan 2009
    Posts
    61
    Vote Rating
    2
    venu is on a distinguished road

      0  

    Default


    Thanks for reply.
    Is there any example of setting the combo in the PropertyGrid?

  4. #4
    Ext User
    Join Date
    Jan 2009
    Posts
    61
    Vote Rating
    2
    venu is on a distinguished road

      0  

    Default SOLVED - How to set combo in PropertyGrid

    SOLVED - How to set combo in PropertyGrid


    SOLVED.

    Here is the solution for adding combo and check box to the PropertyGrid.

    Code:
    Ext.onReady(function(){
        var comboCategory = new Ext.form.ComboBox({
        fieldLabel    : 'Category',
        name        : 'category',
               allowBlank     : false,
               store        : ['Business', 'Personal'],
               typeAhead    : true,
        mode        : 'local',
        triggerAction    : 'all',
        emptyText    :'-- Select category --',
        selectOnFocus    :true
       });
    
       var active = new Ext.form.Checkbox({
         name        : 'active',
         fieldLabel : 'Active',
         checked    : true,
         inputValue : '1'
       });
    
       var propsGrid = new Ext.grid.PropertyGrid({
            el:'props-grid',
            nameText: 'Properties Grid',
            width:300,
            autoHeight:true,
            viewConfig : {
                forceFit:true,
                scrollOffset:2 // the grid will never have scrollbars
            },
        customEditors: {
                'Category': new Ext.grid.GridEditor(comboCategory),
            'Active'  : new Ext.grid.GridEditor(active)
            }
        });
    
        propsGrid.render();
        
        propsGrid.setSource({
            "(name)": "Properties Grid11",
            "grouping": false,
            "autoFitColumns": true,
            "productionQuality": false,
            "created": new Date(Date.parse('10/15/2006')),
            "tested": false,
            "version": 0.01,
            "borderWidth": 1,
            "Category": 'Personal',
        "Active" : true
        });
    });

  5. #5
    Ext JS Premium Member
    Join Date
    Aug 2007
    Posts
    10
    Vote Rating
    0
    floppy is on a distinguished road

      0  

    Default


    The propsGrid.setSource() that you do in your code doesn't seem to have any relationship with the rest of your code.

  6. #6
    Ext User
    Join Date
    Aug 2010
    Posts
    1
    Vote Rating
    0
    Eugene88 is on a distinguished road

      0  

    Question


    Where is it possible to find
    Code:
    Ext.grid.GridEditor
    ?

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