Use TreeSorter
Posted on November 23rd, 2008 by wktd
How can I sort my nodes by attributes?
JSON:
[{"id": "1", "text": "Node 1", "attr" : "100"},
{"id": "2", "text": "Node 2", "attr" : "150"},
{"id": "3", "text": "Node 3", "attr" : "140"}]
JS:
var sorter = new Ext.tree.TreeSorter(tree,
sortType: function(){
... sort by attr ...
}
);
What sortType function input?
What output?
How does it work?
How sort by "attr".
Please, any work sample.
:((:((:((