Results 1 to 2 of 2

Thread: can't group grid

  1. #1
    Sencha User
    Join Date
    Jun 2013
    Posts
    3
    Vote Rating
    0
      0  

    Default can't group grid

    Hi guys,

    I have made, with extjs 3.4, an webapp. I have a grid that i want to group with field 'street' but i can't. My code is here: http://pastebin.com/ZqyysxZg I think i have all the code like this example: http://dev.sencha.com/deploy/ext-3.4.../grouping.html

    I don't know why the grid doesn't group. I get all the data from a database with ajax and php that generate json. All fields shows up. The unique problem is the non grouping. I'm also get no errors.
    Someone could help me with that?
    Thanks


  2. #2
    Sencha - Support Team slemmon's Avatar
    Join Date
    Mar 2009
    Location
    Boise, ID
    Posts
    6,154
    Vote Rating
    249
      0  

    Default

    Try setting the groupField as a config of the store, not the reader:

    Code:
    var store_intervencoes = new Ext.data.GroupingStore({
        reader: new Ext.data.JsonReader({
            root: 'rows',
            autoLoad: false,
            type: 'ajax',
            //remoteGroup: false,
            //groupField: 'street',
            fields: [{
                name: 'street',
                type: 'integer'
            }, {
                name: 'intervenction',
                type: 'string'
            }, {
                name: 'priority',
                type: 'integer'
            }, {
                name: 'value',
                type: 'string'
            }]
        }),
        groupField: 'street'
    });

Tags for this Thread

Posting Permissions

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