PDA

View Full Version : Grouping a grid



mail2nishant
6 Apr 2010, 9:28 AM
i am grouping using Grouping store but always ask is 1 under grouping field.

I validate that DB has returned appropriate rows but somewhere grouping is not grouping.

here is the code. Can you point where I am wrong?

<code>

var readerHomeGrid = Ext.data.Record.create([
{name: 'Name' type:'string'},
{name: 'XType', type: 'string'},
{name: 'State', type: 'string'},
{name: 'Type'},
{name: 'Date', type: 'date', dateFormat: 'n/j h:ia'},
{name: 'comment', type: 'string'}
]);


var HomeGrid = new Ext.data.GroupingStore({
proxy: new Ext.data.DWRProxy(Service, true),
reader: new Ext.data.ListRangeReader(
{id:'Name', totalProperty:'totalSize'}, readerHomeGrid),
sortInfo:{field: 'Name', direction: "ASC"},
groupField:'Name'
//remoteSort: true
});
</code>