Start Building Professional
Web Apps Today


 
Categories Question details Back To List
Question  posted by R. Subramanian on May 28, 2008 04:02
open dhtmlx forum
DHTMLX Tree sorting

Hi,

I would like to know how to do the sorting in tree control.

When I create a new node, it goes to last line, instead I want the new node to be displayed as per alphabatical order. Is it possible to do this, if so means how to do it without refreshing the tree control.

Regards,
R. Subramanian
Answer posted by Support on May 28, 2008 06:27
The pro version of tree contains sorting extension
    dhtmlxtree_sb.js

To sort separate branch of tree you can use
    tree.sortTree(parentID,"asc");

You can call such command after adding new item to the branch, and it will reorder as necessary