PDA

View Full Version : Custom grid Sort



boby.george
15 Nov 2010, 4:43 AM
Is custom sorting possible in ExtJS grid? I want to override default ascending or descending order sorting and write some logic to sort for a datatype String . For ex. the normal sorting would sort like A->B->C-> alphabetically.
In addition to sorting by the value * (string prefixed with * ) the columns should also sort according to the actual # within the column.
If there are no * (prefix containing * in string) or string then just sorts according to normal sort.

Example,
ex for sort ASC (with "*"):
*AN1
*AN2
*AN4
*BN89
4
6
A4
B1
12
25
65

Same example as above, but no column are marked as "*" or string:
1
2
4
4
6
12
65
89

evant
15 Nov 2010, 7:08 AM
Check out the sortType config on the field definition.