EasyUI Forum

General Category => EasyUI for jQuery => Topic started by: aswzen on September 09, 2014, 09:27:53 PM



Title: How to get all node of a tree without checkbox
Post by: aswzen on September 09, 2014, 09:27:53 PM
..
How to get all node of a tree ? ??? ??? ???

I know i can get all of a tree node if there are checkboxes..but if the checkbox state turned to false..how can i do it?

> THIS IS WHAT I WANT BUT USING CHECKBOXES
> [Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object]
> ===========
> THIS IS WHAT I GET IF USING THE getDate METHOD
> Object {id: 1, text: "BAMS App", children: Array[3], state: "open", domId: "_easyui_tree_1"…}

here the fiddle ..see the console.log
http://jsfiddle.net/hgcj79cw/3/

thanks in advance..


Title: Re: How to get all node of a tree without checkbox
Post by: stworthy on September 10, 2014, 12:53:48 AM
Please try to call 'getChildren' method.
Code:
var nodes = $('#tt').tree('getChildren');
console.log(nodes);


Title: Re: How to get all node of a tree without checkbox
Post by: aswzen on September 10, 2014, 01:40:33 AM
wow..thank you..working like a charm..  :D

i don't even know if getChildren was possibly called without params