How to get the index from TreeView

After a DND action i want to save the new order from the nodes.

But i found no funtion to get the index from the nodes.
In the TreeGrid api there is a “forEachRow” function.

thanks for help

You may try to use the onDrop event to get the old/new index of the draggging item of the tree:
docs.dhtmlx.com/api__dhtmlxtreev … event.html

Thanks for your solution.

But i need the index from every item after the drag operation.

regards stephan

Hello Stephan,

You can use getSubItems methods to get a list of sub-item ids:

docs.dhtmlx.com/api__dhtmlxtreev … items.html