View Full Version : MultiGroupingStore and view question

22 Feb 2010, 3:06 AM
I have a grid with an Ext.ux.MultiGroupingStore.
My store has a timestamp field (example '2009-02-10 12:09:00'). I need to show the data in the grid in 2-level groups.
The first group will be date(Y-m-d) and the second will be hour(each hour of the day).
Any feelers on how to do this?

Here is how my code looks like. Needless to say it doesn't work....

Rate = Ext.data.Record.create([
{name: 'action_type', type: 'string'},
{name: 'date', mapping: 'timestamp', type: 'date', dateFormat: 'Y-m-d'},
{name: 'time', mapping: 'timestamp', type: 'date', dateFormat: 'g A'},
{name: 'phone', mapping: 'phone',type: 'string'}

{name: 'reply', type: 'string'}

RatingDataStore = new Ext.ux.MultiGroupingStore({

proxy: new Ext.data.HttpProxy({url: 'ReportService.asmx/getRating', method: 'POST'}),
baseParams: {call_letters: in_call_letters, start_date: in_start_date, end_date: in_end_date},
reader: new Ext.data.XmlReader({
record: 'Table',
totalProperty: 'total',
idProperty: 'id'
}, Rate),
sortInfo:{field: 'phone', direction: "DESC"},
groupField: ['date', 'time'] //groupField: false

var groupView = new Ext.ux.MultiGroupingView ({

showGroupName: false,
groupTextTpl: '{text}'