Start Building Professional
Web Apps Today


 
Categories Question details Back To List
Question  posted by hhpark on Oct 20, 2008 22:24
open dhtmlx forum
dhtmlTree is it a bug?

When the dhtmlTree has only one node, I can't right return of the getAllChecked() function.
Is it real dhtmlTree error? or My mistake?

Other case node count > 1 , dhtmlTree do right.
but only one, dhtmlTree don't.

I want to solve it.
ex)
<?xml version="1.0" encoding="EUC-KR" ?>
<tree id="9">
<item text="AMLExpress" id="9" parId="9">
<userdata name="biz_data">3|#1||#2|9|#3|9|#4|</userdata>
</item>
</tree>

getAllChecked() message 9_1224556888437
Answer posted by Support on Oct 21, 2008 03:56
Ids in the tree should be unique.

If you add the same id as existent, the  item wil have a new id:

    [original id]_[random seed]

So, please, try to change root id or the id of its child:

<?xml version="1.0" encoding="EUC-KR" ?>
<tree id="0">
<item text="AMLExpress" id="9">
<userdata name="biz_data">3|#1||#2|9|#3|9|#4|</userdata>
</item>
</tree>

or
<tree id="9">
<item text="AMLExpress" id="9_0">
<userdata name="biz_data">3|#1||#2|9|#3|9|#4|</userdata>
</item>
</tree>