1. #1
    Sencha User
    Join Date
    Oct 2010
    Posts
    13
    Vote Rating
    0
    Hari1611 is on a distinguished road

      0  

    Question Unanswered: ExtJS 4.0.2 - GridPanel with Multi Level Grouping

    Unanswered: ExtJS 4.0.2 - GridPanel with Multi Level Grouping


    GridPanel on ext 4.0.2 is awesome, but why multi level grouping is not supported.. Is there any plan to implement it. Is there way to implement it on the gridpanel that have now on extjs 4??

  2. #2
    Sencha User
    Join Date
    Oct 2010
    Posts
    13
    Vote Rating
    0
    Hari1611 is on a distinguished road

      0  

    Question


    What does the config option "groupers" in the Ext.data.store meant for.
    Code:
    Ext.create('Ext.data.Store', {
                    storeId:'myStore',
                    fields:['name', 'email', 'phone'],              
                    
                    groupers: [{
                        property : 'name',
                        direction: 'ASC'
                    },{
                        property : 'email',
                        direction: 'ASC'
                    }],
                    data:[
                        { 'name': 'Lisa',  "email":"lisa@sad.com",  "phone":"555-111-1224"  },
                        { 'name': 'Lisa',  "email":"test@bad.com",  "phone":"555-111-1224"  },
                        { 'name': 'Bart',  "email":"bart@asdcom",  "phone":"555-222-1234" },
                        { 'name': 'Bart',  "email":"test2@dswcom",  "phone":"555-222-1234" },
                        { 'name': 'Homer', "email":"home@dwscom",  "phone":"555-222-1244"  },
                        { 'name': 'Marge', "email":"marge@dwscom", "phone":"555-222-1254"  }
                    ],
                });
    Only the first field gets grouped..

    Any idea??

  3. #3
    Sencha User
    Join Date
    Oct 2011
    Posts
    1
    Vote Rating
    0
    nfemery is on a distinguished road

      0  

    Default


    I'm wondering on this as well... I'm attempting to multi-group within the grid.. (multiple group headers).. Has anyone answered this yet??

    Anyway, I see that the groupers actually DO group the data; it seems that the grid isn't doing the correct display.

    -N

    Quote Originally Posted by Hari1611 View Post
    What does the config option "groupers" in the Ext.data.store meant for.
    Code:
    Ext.create('Ext.data.Store', {
                    storeId:'myStore',
                    fields:['name', 'email', 'phone'],              
                    
                    groupers: [{
                        property : 'name',
                        direction: 'ASC'
                    },{
                        property : 'email',
                        direction: 'ASC'
                    }],
                    data:[
                        { 'name': 'Lisa',  "email":"lisa@sad.com",  "phone":"555-111-1224"  },
                        { 'name': 'Lisa',  "email":"test@bad.com",  "phone":"555-111-1224"  },
                        { 'name': 'Bart',  "email":"bart@asdcom",  "phone":"555-222-1234" },
                        { 'name': 'Bart',  "email":"test2@dswcom",  "phone":"555-222-1234" },
                        { 'name': 'Homer', "email":"home@dwscom",  "phone":"555-222-1244"  },
                        { 'name': 'Marge', "email":"marge@dwscom", "phone":"555-222-1254"  }
                    ],
                });
    Only the first field gets grouped..

    Any idea??

  4. #4
    Sencha Premium Member skirtle's Avatar
    Join Date
    Oct 2010
    Location
    UK
    Posts
    3,604
    Answers
    543
    Vote Rating
    325
    skirtle has a brilliant future skirtle has a brilliant future skirtle has a brilliant future skirtle has a brilliant future skirtle has a brilliant future skirtle has a brilliant future skirtle has a brilliant future skirtle has a brilliant future skirtle has a brilliant future skirtle has a brilliant future skirtle has a brilliant future

      0  

    Default


    Grouping and sorting are effectively the same thing, the only real difference is intent. Internally grouping is done using sorting, with the groupers injected at the start of the sort order. Multiple groupings should be fine and you should see your records sorted according to your groupings.

    However, the grid's Grouping feature does not currently support multiple levels of grouping. It only consider the first grouper.

  5. #5
    Sencha User
    Join Date
    Oct 2010
    Posts
    13
    Vote Rating
    0
    Hari1611 is on a distinguished road

      0  

    Question


    Any solution for this???

  6. #6
    Sencha Premium Member skirtle's Avatar
    Join Date
    Oct 2010
    Location
    UK
    Posts
    3,604
    Answers
    543
    Vote Rating
    325
    skirtle has a brilliant future skirtle has a brilliant future skirtle has a brilliant future skirtle has a brilliant future skirtle has a brilliant future skirtle has a brilliant future skirtle has a brilliant future skirtle has a brilliant future skirtle has a brilliant future skirtle has a brilliant future skirtle has a brilliant future

      0  

    Default


    I've not seen anything to do this. I think you'd have to write your own grid view.

  7. #7
    Sencha User BlueSkye's Avatar
    Join Date
    May 2010
    Posts
    48
    Vote Rating
    0
    BlueSkye is on a distinguished road

      0  

    Default


    Quote Originally Posted by skirtle View Post
    Grouping and sorting are effectively the same thing, the only real difference is intent. Internally grouping is done using sorting, with the groupers injected at the start of the sort order. Multiple groupings should be fine and you should see your records sorted according to your groupings.

    However, the grid's Grouping feature does not currently support multiple levels of grouping. It only consider the first grouper.
    So there's no way you can do multi-grouping in a Grid with native Ext4 elements?

    I found this unofficial plugin, but I don't know if it's reliable:

    http://jaffa.sourceforge.net/JaffaRI...ultiGroup.html

    Sencha discussion about the plugin creator: http://www.sencha.com/forum/showthre...uping-in-grids

  8. #8
    Sencha User
    Join Date
    Sep 2011
    Posts
    3
    Vote Rating
    0
    hontao2128 is on a distinguished road

      0  

    Default


    it's simple!just override function getGroupRows of Ext.grid.feature.Grouping.u can try it.but i have no idea about the remote data.

  9. #9
    Sencha User
    Join Date
    Oct 2011
    Location
    Ukraine
    Posts
    154
    Answers
    11
    Vote Rating
    6
    Romick is on a distinguished road

      0  

    Default GridPanel with Multi Level Grouping:

    GridPanel with Multi Level Grouping:


    Can you give us an example?

  10. #10
    Ext Premium Member yyogev's Avatar
    Join Date
    Jun 2009
    Location
    Shoham, Israel
    Posts
    196
    Answers
    5
    Vote Rating
    6
    yyogev is on a distinguished road

      0  

    Default


    Quote Originally Posted by hontao2128 View Post
    it's simple!just override function getGroupRows of Ext.grid.feature.Grouping.u can try it.but i have no idea about the remote data.
    @Hontao2128,

    Have you really done this ? and if you did, did you try this with summary plugin ?

    I have used the Multilevel grouping plugin in ExtJS 3 code, and I can testify that making this work was a very hard task.
    See here:
    http://www.sencha.com/forum/showthre...156#post358156
    Yaron Yogev

    IT Software Developer