PDA

View Full Version : Sorting columns on click DESC instead of ASC



jonttu
17 Jan 2012, 1:34 PM
Hi!

The title pretty much summarizes my question. I found some threads for extjs 3.x and earlier, but could not get a working solution for ext 4.07. I tried to set defaultSortDirection on the store and sortDir on fields in the Model.

What else? Or is there a bug?

Thanks

mitchellsimoens
18 Jan 2012, 6:10 AM
Try this override, this will affect all columns:


Ext.define('Override.grid.column.Column', {
override : 'Ext.grid.column.Column',

possibleSortStates : [ 'DESC', 'ASC' ]
});

Worked for me in 4.1.0 and it should work in 4.0.x. The override way may be different but should work in 4.0.7

jonttu
18 Jan 2012, 10:04 AM
That did the trick!