PDA

View Full Version : Sorting of grid columns



hmnth1
30 Sep 2013, 5:41 AM
I need to sort the grid columns as mentioned below

1. If user clicks on a column first time it should be sorted in ascending order. If user clicks another time on the same column then it should be reverse. If user clicks third time on the same column the sorting order should be removed.
2.
Secondary sort refers to sorting of sorted values but on different columns
User should be able to perform secondary sort by selecting the required column header after Primary Sorting
Second selection of the header should invert the sort order i.e. from ascending to descending
Third selection of the column header should remove the sort criteria. The cycle should be continued

ettavolt
30 Sep 2013, 9:44 AM
Take a look on some (http://docs.sencha.com/extjs/4.2.1/#!/api/Ext.grid.column.Column-method-toggleSortState) methods (http://docs.sencha.com/extjs/4.2.1/#!/api/Ext.grid.column.Column-method-doSort) of Column (http://docs.sencha.com/extjs/4.2.1/#!/api/Ext.grid.column.Column) component. You may want to override some.