Results 1 to 5 of 5

Thread: Sort order for GroupingStore or GroupingView

  1. #1
    Sencha User
    Join Date
    Feb 2010
    Location
    Cologne, Germany
    Posts
    26

    Default Sort order for GroupingStore or GroupingView

    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"]})'
    }),

  2. #2
    Touch Premium Member msinn's Avatar
    Join Date
    Jul 2009
    Location
    in front of my pc
    Posts
    280

    Default

    hi, did you find the solution for that?
    First I would like to thank you for your time and knowledge

    Win 7 Ext JS 4.1.3 IE(6-9), FF17

  3. #3
    Sencha User Condor's Avatar
    Join Date
    Mar 2007
    Location
    The Netherlands
    Posts
    24,245

    Default

    Code:
    groupDir: 'DESC'

  4. #4
    Touch Premium Member msinn's Avatar
    Join Date
    Jul 2009
    Location
    in front of my pc
    Posts
    280

    Default

    thank you Condor
    First I would like to thank you for your time and knowledge

    Win 7 Ext JS 4.1.3 IE(6-9), FF17

  5. #5
    Sencha User
    Join Date
    Feb 2010
    Location
    Cologne, Germany
    Posts
    26

    Default

    As Condor said,
    Code:
    groupDir: 'DESC'
    will help you.
    Sometimes I get lost in the API :-D
    Webhosting? Domains? => Westenberg + Kppers GbR

Similar Threads

  1. GroupingStore/GroupingView Questions
    By jhoweaa in forum Ext 3.x: Help & Discussion
    Replies: 0
    Last Post: 16 Apr 2010, 12:07 PM
  2. GroupingStore / GroupingView Questions
    By chalu in forum Ext 2.x: Help & Discussion
    Replies: 3
    Last Post: 13 Mar 2009, 8:03 AM
  3. NPE in GroupingView with GroupingStore
    By kht in forum Ext GWT: Bugs (1.x)
    Replies: 0
    Last Post: 3 Nov 2008, 11:37 AM
  4. GroupingView/GroupingStore
    By nshah83 in forum Ext 2.x: Help & Discussion
    Replies: 1
    Last Post: 19 May 2008, 2:13 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •