Hi guys,
I make use of an GroupingStore and View to display items grouped per year.
The items in these groups are sorted correctly (descending by invoice number).
However, the groups itself are ordered ascending - so 2009 is above 2010.
Is there any way to change the sort order for the GroupingView?
Code:
var invoiceStore = new Ext.data.GroupingStore({
url: 'fin/getInvoiceList.php',
idProperty: 'ReNr',
autoLoad: true,
autoDestroy: true,
reader: new Ext.data.JsonReader(
{root: 'Invoices'},
[
{name: 'ReNr'},
{name: 'Datum'},
{name: 'Jahr'},
{name: 'Betrag'},
{name: 'Status'}
]),
sortInfo: {
field: 'ReNr',
direction: 'ASC'
},
groupField: 'Jahr'
});
Code:
view: new Ext.grid.GroupingView({
forceFit: true,
hideGroupedColumn: true,
showGroupName: false,
groupOnSort: true,
groupTextTpl: '{text} ({[values.rs.length]} {[values.rs.length > 1 ? "Rechnungen" : "Rechnung"]})'
}),