Start Building Professional
Web Apps Today


 
Categories Question details Back To List
Question  posted by Ravi Kanth AK on Oct 11, 2009 05:51
open dhtmlx forum
How to get only the child nodes of all checked items

Hi,

When i use getAllChecked, I will get all checked item that includes parent node also.

Ex. If A has 3 childs(B,C,D) then getAllChecked returns A,B,C,D when the parent A is checked.

But i want only B,C,D though A is selected.

One method can be used is to use getAllChecked method to get all the checked item ids and then use hasChildren on all the id's one by one to filter out the parent id.

Is there any other method so that it will be more easy?
Answer posted by Alex (support) on Oct 12, 2009 03:23

Hello,

there is no method that returns only checked leaves. But you can use getAllChildless() method to get all ids of items without child nodes. It can be used to exclude parent nodes from getAllChecked() list