How to get Item order number

I’m using dhtmxtree with Coldfusion connector to display a tree from a database. The tree order is defined based on a XML. Now i’m using a DHTMLXMenu in the tooltip in the tree to add childs and siblings to the tree. Via a custom function using “beforeUpdate” i post these new items to the database.

Now i need to pass the sortorder, so the exact position in the tree, to the database as well. How can is achieve this?

This doesn’t provide the correct data: ARGUMENTS.data.get_value(“tr_order”)
Getting the order number of the parent and then +1 it does’t work in this situation as they would get the same order number

  • parent
    • child1 ← correct number is set
    • child2 ← same number as child1 is set.

how can is solve this?

May be you will like to use …
dhtmlx.com/docs/products/dht … _data.html
dhtmlx.com/docs/products/doc … index.html