Demand
Every time the grid data is sorted - before the event is completed, I want to change the extraParams store with the values โโof the new sort properties. For example, if I sort the column name in the DESC direction - before the event is completed , I want to overwrite extraParams in the repository using the dataIndex of the Name column and the DESC property. Direction
My store also has a remoteSort property set to true .
I am using ExtJS 4.2.
Problem
I tried the sortchange event sortchange on the grid, but it executes after calling the data API and loading the records. What I would like to have is something like beforesortchange.
All this with remoteSort : true .
The next problem: if I call this.getStore().load(); from sortchange , then my api data is called twice, which makes no sense.
Code
Mesh receiver:
sortchange: function(ct, column, direction, eOpts) { this.getStore().getProxy().extraParams = { 'sort' : column.dataIndex, 'dir' : direction }
I also tried mesh listeners, but either I do not get new grid sorting options or they are not called at all: beforeload , beforesync , beforeprefetch , load .
References
stack overflow
source share