You found a bug! We've classified it as EXTJS-5536 . We encourage you to continue the discussion and to find an acceptable workaround while we work on a permanent fix.
  1. #1
    Sencha User
    Join Date
    Feb 2012
    Posts
    4
    Vote Rating
    1
    simonhoss is on a distinguished road

      0  

    Default TreePanel Columns - Menu Problem

    TreePanel Columns - Menu Problem


    Hi,

    I have a TreePanel with columns. When I set one column to hideable = false, the column menu have a problem. I cannot hide all other elements via menu because the last visible menu element will be disabled. I think the problem is that the menu doesn't check if an hideable=false column exists.

    Checkout this example: http://jsfiddle.net/GNXGj/1/ and try to hide duration and assigned to.

    Here is my workaround:

    Code:
    this.down('headercontainer').on("menucreate", function(ct, menu, eOpts){
        var items = menu.items.items[3];
        if(items){
            var subItems = items.menu.items.items;
            for(var x=0; x < subItems.length; x++){
                subItems[x].on("disable",function(item, eOpts){
                    item.setDisabled(false);
                });
            }
        }                
    });
    Set this code in the afterrender event from the tree panel.

    Sry. for my english

    Greets

  2. #2
    Sencha - Senior Forum Manager mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    37,004
    Vote Rating
    847
    mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute

      0  

    Default


    I've opened a bug for this.
    Mitchell Simoens @SenchaMitch
    Sencha Inc, Senior Forum Manager
    ________________
    Check out my GitHub, lots of nice things for Ext JS 4 and Sencha Touch 2
    https://github.com/mitchellsimoens

    Think my support is good? Get more personalized support via a support subscription. https://www.sencha.com/store/

    Need more help with your app? Hire Sencha Services services@sencha.com

    Want to learn Sencha Touch 2? Check out Sencha Touch in Action that is in print!

    When posting code, please use BBCode's CODE tags.

Thread Participants: 1