PDA

View Full Version : How to sort grouped fields by another fileld



psmacarov
10 Feb 2011, 11:55 PM
Hi, I write this code


var corm_plSore = new Ext.data.GroupingStore({
reader: new Ext.data.JsonReader({
fields: [
'name',
'dim',
'plan1',
'plan2',
'plan3',
'plan4',
'plan5',
'plan6',
'plan7',
'plan8',
'plan9',
'plan10',
'plan11',
'plan12',
'ag_plan',
'year',
'group',
'farms',
'srt_gr_index'
],
root: 'rows'
}),
proxy: new Ext.data.HttpProxy({
url: 'Ps/st_cormPlan.php',
timeout: 50000000 }),
sortInfo:{field: 'srt_gr_index', direction: "ASC"},
groupField:'group'

});


Groups is sorting ASC by default, but i need that my groups will be sorting by field
"srt_gr_index"
Can i do this without any perversions :D ?