Page 28 of 32 FirstFirst ... 182627282930 ... LastLast
Results 271 to 280 of 313

Thread: Multiple level of grouping in grids

  1. #271
    Sencha Premium Member StaticVoidMain's Avatar
    Join Date
    Aug 2007
    Location
    Buenos Aires - Argentina
    Posts
    38
    Vote Rating
    0
      0  

    Default

    Quote Originally Posted by Hari1611 View Post
    Excellent plugin!! im using similar one on ext 3.
    Do you have any for ext 4??
    looking for such a one desperately..

    Any one please help!!

    Thanks in advance.
    Hi, Hari1611, Ext4 supports multi grouping natively now, you don't need a plugin for that, check the docs for Store.groupers.

    Hope that helps.
    Jernimo Milea

  2. #272
    Sencha User
    Join Date
    Oct 2010
    Posts
    13
    Vote Rating
    0
      0  

    Default

    Thanks for the reply Jernimo Milea
    Ya i found that, but thats not working..it only group data with first item in the groupers collection.
    Code:
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
    <html>
     <head>
      <title> New Document </title>
        <link type="text/css"  href="../../Core/scripts/ext/4.0.0/resources/css/ext-all.css" rel="stylesheet"  />
        <script type="text/javascript" src="../../Core/scripts/ext/4.0.0/ext-all-debug.js" ></script>
        <script type="text/javascript">
    
            Ext.onReady(function(){
            
                var groupers = [{
                        property : 'name',
                        direction: 'ASC'
                    },{
                        property : 'email',
                        direction: 'ASC'
                    }];
                
                Ext.create('Ext.data.Store', {
                    storeId:'simpsonsStore',
                    fields:['name', 'email', 'phone'],
                    groupField: 'name',
                    groupers : [],
                    data:[
                        { 'name': 'Lisa',  "email":"lisa@simpsons.com",  "phone":"555-111-1224"  },
                        { 'name': 'Lisa',  "email":"test@simpsons.com",  "phone":"555-111-1224"  },
                        { 'name': 'Bart',  "email":"bart@simpsons.com",  "phone":"555-222-1234" },
                        { 'name': 'Bart',  "email":"test2@simpsons.com",  "phone":"555-222-1234" },
                        { 'name': 'Homer', "email":"home@simpsons.com",  "phone":"555-222-1244"  },
                        { 'name': 'Marge', "email":"marge@simpsons.com", "phone":"555-222-1254"  }
                    ],
                });
                
                var groupingFeature = Ext.create('Ext.grid.feature.Grouping', {
                    groupHeaderTpl: 'Group: {name} ({rows.length})'//, //print the number of items in the group
                    //startCollapsed: true // start all groups collapsed
                });
    
    
                var grid = Ext.create('Ext.grid.Panel', {
                    title: 'Simpsons',
                    store: Ext.data.StoreManager.lookup('simpsonsStore'),
                    columns: [
                        { header: 'Name',  dataIndex: 'name' },
                        { header: 'Email', dataIndex: 'email', flex: 1 },
                        { header: 'Phone', dataIndex: 'phone' }
                    ],
                    height: 400,
                    width: 600,
                    features: [groupingFeature],
                    renderTo: Ext.getBody()
                });
                
                grid.store.group(groupers, "DESC");
                
            });
            
    
        </script>
     </head>
    
     <body>
      
     </body>
    </html>
    Any thing wrong with the code??

  3. #273
    Sencha User
    Join Date
    Oct 2010
    Posts
    13
    Vote Rating
    0
      0  

    Question

    Already posted a thread regarding the groupers.. but i cant find the solution for my problem..link to the thread is here
    http://www.sencha.com/forum/showthre...Level-Grouping

    Any suggestion's???

  4. #274
    Sencha User psianil9's Avatar
    Join Date
    Nov 2011
    Location
    Irvine
    Posts
    3
    Vote Rating
    0
      0  

    Exclamation Multilevel Groupping

    So far i haven;t found any solution with Ext JS 4 for multi-level grouping. It's strange that it is consistently requested by several forums since 2009, and still not part of framework!

    Does anyone has found solution?

  5. #275
    Sencha User
    Join Date
    May 2011
    Posts
    17
    Vote Rating
    0
      0  

    Default

    It takes time to load when handling large amounts of data/rows. It sometimes trigger the browser's javascript run time error. Any solution to this?

  6. #276
    Ext Premium Member yyogev's Avatar
    Join Date
    Jun 2009
    Location
    Shoham, Israel
    Posts
    196
    Vote Rating
    6
      0  

    Default

    Quote Originally Posted by leolox69 View Post
    It takes time to load when handling large amounts of data/rows. It sometimes trigger the browser's javascript run time error. Any solution to this?
    Yes - rewrite in ExtJS 4... Unfortunately no one has taken this challenge yet.
    In my application I am forced to give up the use of this extension and use single-level grouping as it is blocking my move to Ext 4.
    Yaron Yogev

    IT Software Developer

  7. #277
    Sencha User justusvm's Avatar
    Join Date
    May 2010
    Location
    Chennai, TN
    Posts
    10
    Vote Rating
    0
      0  

    Default

    Please update the multigrouping in grid using extjs 4

  8. #278
    Ext JS Premium Member
    Join Date
    Mar 2011
    Posts
    26
    Vote Rating
    2
      0  

    Default

    Can anyone adapt Multilevel grouping plugin for ExtJs 4? Please!!!!

  9. #279
    Sencha User
    Join Date
    May 2011
    Posts
    17
    Vote Rating
    0
      0  

    Default

    Quote Originally Posted by yyogev View Post
    Yes - rewrite in ExtJS 4... Unfortunately no one has taken this challenge yet.
    In my application I am forced to give up the use of this extension and use single-level grouping as it is blocking my move to Ext 4.
    I have now a solution to prevent javscript runtime errors. Instead of reloading the store, just use the Ext.Ajax.request to get the JSON data. I then use the Ext.TaskMgr to add the records using store.add(record) method.
    Code:
    revenue_audit.app.rowDataDef = Ext.data.Record.create([
                        {name: 'country', type: 'string'},
                        {name: 'customer', type: 'string'},
                        {name: 'progproj', type: 'string'},
                        {name: 'activity', type: 'string'},
                        {name: 'activity_count'},
                        {name: 'frequency'},
                        {name: 'date'},
                        {name: 'qty'},
                        {name: 'price'},
                        {name: 'amt'},
                        {name: 'encoded_by'},
                        {name: 'date_encoded'},
                        {name: 'modified_by'},
                        {name: 'date_modified'}
                    ]);
    
    store = new Ext.ux.grid.MultiGroupingStore({
                        reader: revenue_audit.app.reader,
                        sortInfo: {field: 'customer', direction: 'ASC'},
                        groupField: ['country', 'customer', 'progproj', 'activity']
    });
    
    Ext.Ajax.timeout = 3600000;
                    Ext.Ajax.request({
                        url: "data.php",
                        params: params,
                        method:'POST', 
                        success: function(f, a)
                        {
                             var decode = Ext.util.JSON.decode(f.responseText);
                            
                            if( !decode.data ){
                                return;
                            }
                            if( decode.data.length == 0 ){
                                return;
                            }
                            
                            var r = 0;
                            var task = {
                                interval: 1,
                                scope: this,
                                run: function(){
                                    var Data = decode;
                                    if( r == Data.data.length ){
                                        return;
                                    }
                                    
                                    var rec = new rowDataDef({
                                        'country': Data.data[r].country,
                                        'customer': Data.data[r].customer,
                                        'progproj': Data.data[r].progproj,
                                        'activity': Data.data[r].activity,
                                        'activity_count': Data.data[r].activity_count,
                                        'frequency': Data.data[r].frequency,
                                        'date': Data.data[r].date,
                                        'qty': Data.data[r].qty,
                                        'price': Data.data[r].price,
                                        'amt': Data.data[r].amt,
                                        'encoded_by': Data.data[r].encoded_by,
                                        'date_encoded': Data.data[r].date_encoded,
                                        'modified_by': Data.data[r].modified_by,
                                        'date_modified': Data.data[r].date_modified
                                    });
                                    
                                    store.add(rec);
                                    r++;
                                }
                            };
                            
                            Ext.TaskMgr.start( task );
                        },
                        failure: function(f,a){}
                    });

    I learned it from here http://werxltd.com/wp/2009/07/03/cleaning-up-unresponsive-script-errors/




  10. #280
    Sencha User justusvm's Avatar
    Join Date
    May 2010
    Location
    Chennai, TN
    Posts
    10
    Vote Rating
    0
      0  

    Default

    Hi leolox69
    Kindly post the code for multigroupingstore and grid

Page 28 of 32 FirstFirst ... 182627282930 ... LastLast

Posting Permissions

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