dhtmlxTree and connector problem with children

Hi,
I am trying to get a dynamic dhtmlxTree working as part of a evaluation of dhtmlx but am having some problems. Am using loadXML and the top level of the tree populated with no problem, xml below.

Expanding ‘test a’ to see its children work fine, as it has non.
The problem is when I try to see the children of ‘test b’ and I get an sql error:

SELECT taskId,taskName FROM tasks WHERE parentId = 2_1273563021920 ORDER BY taskName ASC

Why is it looking for the parentId of ‘2_1273563021920’, when it should be ‘2’.

Any ideas?

Hi,

id must be unique in tree. In your code the the parent id is the same as the id of ‘test b’ node:
<tree id=‘2’>

<item id=‘2’ text=‘test b’ child=‘1’ >

Try to change one of the ids to solve the problem

Have tried several ways to get around the 2 id’s being the same but cant figure it out.
I think the problem is that the data that I am using has the top of a tree’s parent id as itself
Eg. if the top of the tree was id 2, its parent it is also 2. I cant change this, its just the way the data is.

Is there anything I can do to get around this problem, so that the tree will work?

Thanks for any help with this.

Is there anything I can do to get around this problem, so that the tree will work?

IDs must be unique. There is no workaround to this.

Check the server-side script that generates the tree xml.