Found a solution by myself.
When I need my multi-sort, I set all columns on the grid to sortable: false
at creation time (seems like it is not possible to do this on-the-fly)
Then I set a on('headerclick
, function() {...})` to all the column-objects right after I created the grid.
The sortable: false
prevents the click event on the header from sorting the table, but later I can still call sort()
on the store programatically with the saved columns.
var oGrid = Ext.create( 'Ext.grid.Panel', {
...
columns: [
{ ..., sortable: false }
]
});
for( i in oGrid.columns ) {
oGrid.columns[i].on('headerclick', function(){...});
}