The default lexicographic schemes employed when sorting strings (the
display property) may not suffice in your
TreePanel instance. Consider having a tree of nodes representing college students; you may want to sort based on other things besides the node's label — which would of course be the names of the students — such as sorting by their age, year of admission, number of extracurricular activities, and CGPA.
This sort of behavior, which is actually seen in the
TreeStore instance, can be controlled by a custom
StoreSorter implementation, set on the
TreeStore instance with
store.setStoreSorter(), and used to determine the ordinal index of a node (relative to its siblings) within a parent node.
Give the ...