PDA

View Full Version : GroupingStore Pagination



MmarcoM
9 Oct 2009, 10:29 AM
Hello,
i am having problems with pagination and Grouping Store
i was successfully able to use pagination with a JsonStore,
here's my code .. anyone could tell me what i am missing?



var provisionRecordLimit = 10;

// fake grid data used below in the tabsNestedLayouts config
var dsProvisions = new Ext.data.GroupingStore({
proxy: new Ext.data.HttpProxy({url: '../provision-data/LoadProvisions.do'}),
totalProperty:'model.result.total',
reader: new Ext.data.JsonReader(
{root:'model.result.provisionList',
id:'id',
fields:
[ {name: 'id' , mapping:'id'},
{name: 'description', mapping: 'description'},
{name: 'provisionType', mapping: 'provisionType'},
{name: 'provisionAmount' , mapping:'provisionAmount'},
{name: 'provisionDate', mapping:'provisionDate', convert:convertDate},
{name: 'user' , mapping:'user'}]}),
sortInfo:{field: 'provisionType', direction:'ASC'},
remoteSort:false,
groupField:'provisionType'
});
dsProvisions.load({params:{start:0,limit:provisionRecordLimit}});
this is some of the json data returned


{"model": {"result": {"total": "18","provisionList": [{"id": "40","description": "presents","provisionAmount": "15.0","user": "simone","provisionType": "PRESENTS","provisionDate": "Sun Sep 20 00:00:00 BST 2009"},{"id": "38","description": "water","provisionAmountanyone could help ?
regards
marco

cesarzea
19 Nov 2010, 3:55 AM
I would like to know how to do that.

Please, response if you could solve it.

Thanks.
Cesar.