You found a bug! We've classified it as EXTJSIV-7082 . We encourage you to continue the discussion and to find an acceptable workaround while we work on a permanent fix.
  1. #11
    Sencha User
    Join Date
    Feb 2009
    Posts
    5
    Vote Rating
    0
    Steferson Patake is on a distinguished road

      0  

    Default


    i came with a better approach:

    changing the listener from the form panel to the store, like this:
    Code:
    var storeOpcoesAcesso = Ext.create('Ext.data.JsonStore', {
    ...
    groupField: 'descricao',
    listeners: {
      load: function(este, opts) {
        groupingFeature.collapseAll();
      }
    },
    ...
    });
    now its working fine

  2. #12
    Sencha User Daniil's Avatar
    Join Date
    Jun 2010
    Location
    Saint-Petersburg, Russia
    Posts
    683
    Vote Rating
    62
    Daniil is a jewel in the rough Daniil is a jewel in the rough Daniil is a jewel in the rough Daniil is a jewel in the rough

      0  

    Default


    Thank you for sharing your findings!

    We all are curious when it will be fixed in ExtJS
    Ext.NET - ASP.NET for Ext JS
    MVC and WebForms
    Examples | Twitter

  3. #13
    Sencha User
    Join Date
    Sep 2012
    Posts
    16
    Vote Rating
    2
    expensior is on a distinguished road

      0  

    Default


    These "fixes" do not seem very efficient at all. I mean listening and collapsing after the store has loaded the data seems incredibly inefficient especially in grouping grids with 20-30 groups.

    The only real fix should be that they are initially collapsed when rendered after adding them to the store.

    I really wonder why this was not fixed since it is an old issue.

    In 4.1.1 I used this to fix this problem

    Code:
    grid.getView().on({                 'beforerefresh': function(view,eOpts) { 
                        return false; 
                    },             
                    single: true 
                });
    And similiar to then expand single groups which had its expansion state saved in a session cookie.

    Doesn't work in 4.2 anymore however. Does nothing.

    Maybe someone should report this bug in the 4.2 forum.