How can I get the leaf node with dhtmlxtree?

Hi Team

I have a problem when I get all selected node in my tree. Once I use “tree.getAllChecked()” function to get my select leaf nodes, but it always return parent node for me too.

So how can I get the leaf only when I use dhtmlxtree?

Best wishes,

Judo

Hello,

there is getAllChildless() method that returns the list of leaves. So, you can iterate through ids in this list and choose items with checked state =1. The isItemChecked method returns the state of item checkbox:

docs.dhtmlx.com/doku.php?id=dhtm … temchecked

Hi Alexandra

It works, thanks for your quick response.

Best wishes,

Judo

Hi Alexandra/Judo,

getAllChildless() is not working in IE 11.

However, you can use this:
ch = tree.hasChildren(itemId);
if(ch==0){function()}

Hi, bishu219
What dhx version do you use?
There was added a lot of new features for IE11 in the last versions…

Hi Darya,

I am using dhx 3.5 version and i found the above api is not working in IE 11.

Thanks!

Yes, IE11 fixes was included in 3.6 (November build) and now DHX v4.0.3 is actual