ExtJs4 treepanel + checkbox 모두 선택

        var mytree = new Ext.tree.TreePanel({
            id: 'ppdTree',
            x: 5,
            y: 5,
            width: 378,
            height: 470,
            useArrows: true,
            autoScroll: true,
            animate: true,
            enableDD: true,
            containerScroll: true,
            store: new Ext.data.TreeStore
                        ({
                            proxy:
                            {
                                type: 'ajax',
                                url: 'data/User/UserPopedom.aspx?parameter=ppdTree&userId=' + userId
                            },
                            root:
                            {
                                id: 0,
                                text: " ",
                                leaf: false,
                                expandable: true,
                                expanded: true
                            },
                            sorters: [
                            {
                                property: 'leaf',
                                direction: 'ASC'
                            },
                            {
                                property: 'text',
                                direction: 'ASC'
                            }]
                        })
        });
        mytree.on('checkchange', function (node, checked) {
            node.expand();
            node.checked = checked;
            node.eachChild(function (child) {
                child.set('checked', checked);
                child.fireEvent('checkchange', child, checked);
            });
        }, mytree);
 

좋은 웹페이지 즐겨찾기