Hybrid View

  1. #1
    Sencha User
    Join Date
    Nov 2010
    Posts
    3
    Vote Rating
    0
    grtpk is on a distinguished road

      0  

    Default Unanswered: Adding a treepanel gridpanel's cell

    Unanswered: Adding a treepanel gridpanel's cell


    Hi everbody,

    I want to show a treepanel in gridpanel's cells. That is possible? I have rendered column, but does not happen.

    Code:
    { 
                        header: 'TreePanel',
                        dataIndex: 'Id',
    
                        editor: new Ext.tree.TreePanel({
                                    width: '100%',
                                    height: 200,
                                    autoScroll:true,
                                    root:
                                    {
                                        text: 8563,
                                        id: '8563',
                                        expanded: true
                                    },
                                    rootVisible: false,
                                    loader: new Ext.tree.TreeLoader({
                                        directFn: DataAction.GetShow,
                                        paramOrder: ['node']
                                    })
    
    
                                })
                    }

  2. #2
    Sencha - Community Support Team
    Join Date
    Jan 2012
    Posts
    1,376
    Answers
    346
    Vote Rating
    109
    vietits is a name known to all vietits is a name known to all vietits is a name known to all vietits is a name known to all vietits is a name known to all vietits is a name known to all

      0  

    Default


    Have a look at my component: Its.grid.column.Component. It allows you to embed components in grid cells. Below is an example of using this component to render treepanel in grid cells.
    Code:
    Ext.require([
        'Ext.*',
        'Its.grid.column.Component'
    ]);
    
    
    Ext.onReady(function(){
        Ext.create('Ext.grid.Panel', {
            renderTo: Ext.getBody(),
            title: 'ITS Component Column Demo',
            width: 500,
            height: 300,
            store: {
                type: 'store',
                fields: ['name', 'tree'],
                data: [{
                    name: 'Tree 1',
                    tree: {
                        text: 'Tree 1 Root',
                        expanded: true,
                        children: [{
                            text: 'Node 1',
                            expanded: true,
                            children: [{
                                text: 'Node 1.1',
                                leaf: true
                            }]
                        },{
                            text: 'Node 2',
                            leaf: true
                        }]
                    }
                },{
                    name: 'Tree 2',
                    tree: {
                        text: 'Tree 2 Root',
                        expanded: true,
                        children: [{
                            text: 'Node 1',
                            leaf: true
                        },{
                            text: 'Node 2',
                            expanded: true,
                            children: [{
                                text: 'Node 2.1',
                                leaf: true
                            }]
                        }]
                    }
                }]
            },
            columns: [{
                text: 'Name',
                flex: 1,
                dataIndex: 'name'
            },{
                xtype: 'itscomponentcolumn',
                text : 'Tree Panel',
                width: 400,
                dataIndex: 'tree',
                items: function(value){
                    return {
                        xtype: 'treepanel',
                        width: 380,
                        height: 100,
                        store: {
                            type: 'treestore',
                            fields: ['text'],
                            root: value
                        }
                    }
                }
            }]
        });
    });
    Here is screenshot of example.
    treepanelingridcell.jpg

  3. #3
    Sencha User
    Join Date
    Nov 2010
    Posts
    3
    Vote Rating
    0
    grtpk is on a distinguished road

      0  

    Default


    thanks for your reply,

    I use Ext 3.3 version. Can I use this component in 3.3 version ? How can I use this component in 3.3 version?
    Last edited by grtpk; 1 Oct 2012 at 3:11 AM. Reason: add version

  4. #4
    Sencha - Community Support Team
    Join Date
    Jan 2012
    Posts
    1,376
    Answers
    346
    Vote Rating
    109
    vietits is a name known to all vietits is a name known to all vietits is a name known to all vietits is a name known to all vietits is a name known to all vietits is a name known to all

      0  

    Default


    I wrote this component for Ext 4.x. I am not sure whether or not it will work with Ext 3.3. I don't have experience with that version.

Thread Participants: 1

Tags for this Thread

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