-
19 Feb 2013 3:39 AM #1
Answered: Stopping a sortchange event
Answered: Stopping a sortchange event
Is it possible to stop the sortchange event?
I want to implement my own sorting, which should trigger when clicked on a column header.Using Ext JS 4.1 (commercial) to build GUIs for web analytics.
-
Best Answer Posted by da_b0uncer
Thank you for the quick reply, but I couldn't modify the class directly, since I need it with and without this functionality.
I now create all columns of the grids with my sorting toand add anCode:sortable: false
listener to the created columns. But not to those who should be unsortable.Code:'headerclick'
-
19 Feb 2013 4:12 AM #2
you can try the following override for column header click:
Code:Ext.override(Ext.grid.column.Column, { onElClick: function(e, t) { var me = this, ownerHeaderCt = me.getOwnerHeaderCt(); if (ownerHeaderCt && !ownerHeaderCt.ddLock) { gridID = this.up('grid').id; // you can get the grid's id here if you want to use it return false; // return false to cancel click event on grid column's header element } } });
-
19 Feb 2013 5:33 AM #3
Thank you for the quick reply, but I couldn't modify the class directly, since I need it with and without this functionality.
I now create all columns of the grids with my sorting toand add anCode:sortable: false
listener to the created columns. But not to those who should be unsortable.Code:'headerclick'
Using Ext JS 4.1 (commercial) to build GUIs for web analytics.


Reply With Quote