Success! Looks like we've fixed this one. According to our records the fix was applied for a bug in our system in a recent build.
  1. #1
    Sencha User
    Join Date
    Jun 2011
    Posts
    5
    Vote Rating
    1
    darkside_ua is on a distinguished road

      0  

    Exclamation [4.0.2] groupToggleMenuItem is null

    [4.0.2] groupToggleMenuItem is null


    When using 'Ext.grid.feature.Grouping' with 'enableGroupingMenu: false' config parameter there is an error in ext-all-debug.js at line 79141 when toggling grouping feature enable/disable. The error 'groupToggleMenuItem is null' is at line:

    Code:
    groupToggleMenuItem.setChecked(true, true);
    So, you just need to add a check for 'groupToggleMenuItem is not null' to resolve this.

  2. #2
    Sencha User
    Join Date
    Jan 2009
    Location
    Colombia
    Posts
    6
    Vote Rating
    0
    leonardodaza is on a distinguished road

      0  

    Default Hi darkside_ua

    Hi darkside_ua


    Quote Originally Posted by darkside_ua View Post
    When using 'Ext.grid.feature.Grouping' with 'enableGroupingMenu: false' config parameter there is an error in ext-all-debug.js at line 79141 when toggling grouping feature enable/disable. The error 'groupToggleMenuItem is null' is at line:

    Code:
    groupToggleMenuItem.setChecked(true, true);
    So, you just need to add a check for 'groupToggleMenuItem is not null' to resolve this.
    Thanks for your post. I´ve a question... How add the check?

  3. #3
    Sencha User
    Join Date
    Jun 2012
    Posts
    3
    Vote Rating
    0
    mfreund is on a distinguished road

      0  

    Default


    Problem exists here too... with 4.1.0

  4. #4
    Sencha - Ext JS Dev Team evant's Avatar
    Join Date
    Apr 2007
    Location
    Sydney, Australia
    Posts
    17,150
    Vote Rating
    673
    evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute

      0  

    Default


    This issue is resolved in the latest build, the current code reads:

    Code:
    groupToggleMenuItem = me.view.headerCt.getMenu().down('#groupToggleMenuItem');
    if (groupToggleMenuItem) {
        groupToggleMenuItem.setChecked(true, true);
    }
    Evan Trimboli
    Sencha Developer
    Twitter - @evantrimboli
    Don't be afraid of the source code!

  5. #5
    Ext JS Premium Member
    Join Date
    Mar 2007
    Location
    Germany
    Posts
    691
    Vote Rating
    25
    Dumbledore will become famous soon enough Dumbledore will become famous soon enough

      0  

    Default


    this is not fixed in 4.1.3 inside onColumHideShow:

    PHP Code:
        onColumnHideShow: function() {
            var 
    menu this.grid.headerCt.getMenu(),
                
    groupToggleMenuItem menu.down('#groupMenuItem');
                
    // "Group by this field" must be disabled if there's only one column left visible.
            
    if (this.view.headerCt.getVisibleGridColumns(true).length 1) {
                
    groupToggleMenuItem.enable(); // here is it not fixed
            
    } else {
                
    groupToggleMenuItem.disable();
            }
        },
        
    showMenuBy: function(theader) {
            var 
    menu this.getMenu(),
                
    groupMenuItem menu.down('#groupMenuItem'),
                
    groupMenuMeth header.groupable === false 'disable' 'enable',
                
    groupToggleMenuItem menu.down('#groupToggleMenuItem');
            
            
    groupMenuItem[groupMenuMeth]();
            if (
    groupToggleMenuItem) {                  // here is it fixed
                
    groupToggleMenuItem[this.view.store.isGrouped() ? 'enable' 'disable']();
            }
            
    Ext.grid.header.Container.prototype.showMenuBy.apply(thisarguments);
        },