PDA

View Full Version : Custom sorting of Store Records



r_honey
2 May 2010, 12:25 PM
I have seen Threads & Doc pages regarding this, including the following:

http://www.extjs.com/forum/showthread.php?71668-Customizable-sorting-of-stores-grids
http://www.extjs.com/learn/Ext_FAQ_Grid#Sorting_issues

However, my requirements are as discussed by Animal in the first link above (a custom Comparator function, that is passed 2 records and that returns -1, 0, or +1).

I cannot figure out the Sort Value from just one record (thus unable to use sortType). I would search for both the records for their related data in another external store, and sort them based on the data in the external store. Clearly, I need to to get hold of the 2 records being compared to decide their Sort Order.

Is this possible without going overly custom and overriding private Store methods??