Hybrid View
-
29 Dec 2012 12:04 AM #1
Unanswered: How to Remove the custom sorters applied on grid columns on grid reload?
Unanswered: How to Remove the custom sorters applied on grid columns on grid reload?
On grid reload, how to remove the custom sorters applied on grid columns ? we tried to remove the store sorters on grid render(bad practice).
I hope there is already a solution provided in ext js new versions, to remove the sort icons on grid columns when it is reopened/reloaded.
-
29 Dec 2012 2:56 AM #2
Does this work for you?
Here's a live example of it: http://jsfiddle.net/existdissolve/vVSWT/PHP Code:grid.getStore().sorters.clear();
grid.getView().refresh();
-
29 Dec 2012 7:39 AM #3
in my case when reloading the grid, the grid view is not refreshing . if we removed the sorters on grid reload grid will be loosing the sorters defined in store right?
-
29 Dec 2012 8:18 AM #4
Yeah, I believe if the store still retains the sort, the grid will inherit the current sorting state of the store, since the sorting on the grid is driven by the store.
So, if you reload the grid, you could add a listener to the render event and clear the bound store's sorters at that point:
PHP Code:mygrid.on( 'render',function( grid, opts ) {
grid.getStore().sorters.clear();
})


Reply With Quote