Start Building Professional
Web Apps Today


 
Categories Question details Back To List
Question  posted by RamaRao R on Nov 19, 2009 22:41
open dhtmlx forum
Sort functionality when Tree is loading

Hello,

 

1. I am looking for sort functionality(Ascending order) when tree is loading.  Is it possible to define in JSON object itself or please let me know the best way.

 

2. How to cal a function when tree is loading?

 

3. Please send me complete JSON format with all parameters so that I can go through the list as per my requirement.

 

Thanks,

RamaRao R.

Answer posted by Alex (support) on Nov 20, 2009 01:37

Hello,

it is better to sort tree items on server if json is generated by some server-side script.

But also it is possible to sort tree after loading:

tree.loadJSON("some.json",function(){

    tree.sortTree(0,"asc",1)

})