开发者

How to get the Ext Tree childNodes' id?

I make a Ext tree开发者_如何学Go ,every node contains a checked,every node has a "checkchange" listeners. If I choose a node ,how to make all its childNodes' checked selection to true? And how can I get all child leafNodes' id ?


oncheckchange = function(node, checked, options) {
    node.cascadeBy(function(n) {
        alert(n.get('id')); // gives the child node's Id
        n.set('checked', checked);
    });
};

tree.on('checkchange', oncheckchange, null);


In pure Ext you should just be able to do node.id, or node.attributes.id (I forget which) to get the node's ID. In terms of children then it's node.childNodes[*].id etc.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜