PDA

View Full Version : Grid sortchange firing twice



tangalla
17 Jul 2013, 11:05 AM
Hello,

I am using extjs 4.1 , grid sortchange event is firing twice.


'sortchange' : function(ct, column, direction, eOpts ){
this.getStore().getProxy().setExtraParam('sortParameter' , column.dataIndex);
this.getStore().getProxy().setExtraParam('sortDirection' , direction);
this.getStore().loadPage(1);
}

Is there any way to override the default sort params . I need some thing like sortParameter and sortDirection insteadt of sort({parameter : '' , direction : ''})

Thanks in advance. :)

slemmon
19 Jul 2013, 12:01 PM
You might consider using remoteSort: true instead.
http://docs.sencha.com/extjs/4.2.1/#!/api/Ext.data.Store-cfg-remoteSort