开发者

Automatically check/uncheck all subtree nodes in extjs tree when certain node gets checked/unckecked

开发者 https://www.devze.com 2023-03-17 13:40 出处:网络
How do I automatically check/uncheck all开发者_Python百科 subtree nodes in an extjs tree when a certain node gets checked/unckecked. I already have my tree with checkboxes. The only thing missing is t

How do I automatically check/uncheck all开发者_Python百科 subtree nodes in an extjs tree when a certain node gets checked/unckecked. I already have my tree with checkboxes. The only thing missing is this check/unckeck behavior. I found this: check child nodes of a tree when a parent is clicked [ExtJS] , but it doesn't work for me because the the extjs API seems to be changed.


I found a solution:

oncheckchange = function(node, checked, options){
    node.cascadeBy(function(n){n.set('checked', checked);} );
};

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

精彩评论

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

关注公众号