View Full Version : Ext.treePanel drag/drop with treeSorter set

13 May 2010, 6:21 AM

I have a treePanel with treeSorter set, sorting the tree by node.sortOrder property (which is also a field in the DB ). Now, with the treeSorter set, I'm not able to drag/drop nodes on the same depth level, because they all have the sortOrder property and the sorter immediately sorts the nodes after drop. How do I make the sorter to sort the tree only upon render, after that I don't need the sorting?

Thanks in advance

17 May 2010, 11:05 AM
Why don't you just sort on the back-end?

19 May 2010, 5:12 AM
Simple :)

I was doing that, but I had some nodes with same sortOrder number and I was getting a different order on every reload. But after the first reordering, the sorting method that I applied got the sortOrder numbers straight, and now I no longer need the treeSorter. But thanks anyway.