PDA

View Full Version : error with multiSortInfo in a Ext.data.GroupingStore



flamant
31 Mar 2011, 12:00 PM
Hi,
I use a Ext.data.GroupingStore for a grid
Here is the store where I want to sort the lines of the grid by first 'status' and secondly by 'dueDate' :


var remoteQueryStore = new Ext.data.GroupingStore({
reader: gridReader,
proxy: gridProxy,
multiSort: true,
multiSortInfo:{
sorters: [{field: 'status', direction: "ASC"}
,{field: 'dueDate', direction: "ASC"}],
direction: 'ASC'},
groupField:'activity'
});


Here is the JsonReader with its fields:


var gridReader = new Ext.data.JsonReader({
root: 'records',
fields: crfDataFields
})
var crfDataFields = [
{ name: 'creator' },
{ name: 'creatorRole' },
{ name: 'center' },
{ name: 'activity' },
{ name: 'screen' },
{ name: 'screenId', type: 'int' },
{ name: 'subjectId', type: 'int' },
{ name: 'status', type: 'int' },
{ name: 'type' },
{ name: 'title' },
{ name: 'seq', type: 'int' },
{ name: 'createdOn' },
{ name: 'id' },
{ name: 'dueDate' },
{ name: 'daysLeft' },
{ name: 'answerRole'},
{ name: 'answered', type: 'boolean' },
{ name: 'screenSigned', type: 'boolean' },
{ name: 'screenFrozen', type: 'boolean' }
];


And I have the following error in firebug when I try to group the results by a field (accessible from the column):


this.multiSort.call is not a function


I have not found an example on the web on how to use multiSortInfo with multiple fields. Maybe I use it wrongly.

Thank you in advance for your help

flamant
1 Apr 2011, 12:18 AM
By removing



..., multisort: true, ...
it works.

I have found a post with similar issue :
http://www.sencha.com/forum/showthread.php?113634-Does-GroupingStore-not-support-multisort&p=530420

it seems that it is a bug in EXTJS