Good morning, I got a little problem, I think that is so bug Ext researched, but so far not found any solution or override .. I use the Rodrigo override this at the moment to facilitate the cluster:
Code:
Ext.data.JsonGroupingStore = function(c){
Ext.data.JsonGroupingStore.superclass.constructor.call(this, Ext.apply(c, {
proxy: c.proxy || (!c.data ? new Ext.data.HttpProxy({url: c.url}) : undefined),
reader: new Ext.data.JsonReader(c, c.fields)
}));
};
Ext.extend(Ext.data.JsonGroupingStore, Ext.data.GroupingStore, {});
Code:
this.storeMovimentacoes = new Ext.data.JsonGroupingStore({
remoteSort: true,
root: 'rows',
idProperty: 'id',
totalProperty: 'total',
url : 'include/tesouraria/movimentacaoAction.php?action=listarMovimentacoes',
groupField:'departamento',
baseParams: { start:0, limit:40 },
fields: [
{name : 'id', type : 'int'},
{name : 'departamento', type : 'string'},
{name : 'tipo_movimentacao', type : 'string'},
{name : 'data_movimentacao', type : 'date', dateFormat: 'Y-m-d'},
{name : 'responsavel', type : 'string'},
{name : 'valor', type : 'float'}
]
});
it loads right first time, but when you choose to group by another column, returns me the following error:
Code:
sorters[0] is undefined
Line 22112
Code:
if (this.remoteSort) {
22112 this.singleSort(sorters[0].field, sorters[0].direction);
22113
22114 } else {
22115 this.applySort();
22116 this.fireEvent('datachanged', this);
22117 }
Thanks!