1. #1
    Sencha User
    Join Date
    Dec 2011
    Posts
    2
    Vote Rating
    0
    mayoimichi is on a distinguished road

      0  

    Question hiding all column in ColumnModel with CheckboxSelectionModel

    hiding all column in ColumnModel with CheckboxSelectionModel


    Hi, I'm using ColumnModel with CheckboxSelectionModel in my gridpanel. This is my source code:
    Code:
    return new Ext.grid.ColumnModel([
        new Ext.grid.CheckboxSelectionModel({checkOnly: true}),
        {
            header: 'filename',
            dataIndex: 'filename',
            width: 120
        },{
            header: 'filepath'
            dataIndex: 'path',
            width: 270
        }
    ]);
    It works well. But when I uncheck all fields on the menu of ColumnModel, some problem happened. I can never check my field back, because I cannot open the menu of ColumnModel.

    The design of ColumnModel do not allow to uncheck all fields on the menu of ColumnModel and leaving last one field on it. But CheckboxSelectionModel is one member Column of ColumnModel. I can uncheck all fields except CheckboxSelectionModel.

    For ColumnModel, there is still one field left on the ColumnModel, but CheckboxSelectionModel disabled the menu of Column. I can't get other fields back by checking the field on the menu.

    I must missed some property or some technique. Does anybody know how to fix this?

  2. #2
    Sencha - Senior Forum Manager mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    37,218
    Vote Rating
    859
    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


    Do you have an error?
    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.

  3. #3
    Sencha User
    Join Date
    Dec 2011
    Posts
    2
    Vote Rating
    0
    mayoimichi is on a distinguished road

      0  

    Default


    No, there is no error. But this behavior would bothering user.
    Once all columns were hided manually except CheckboxSelectionModel itself, which is not hidable with column menu disabled, we can never show/un-hide any column back because we don't have column menu to click and check.

  4. #4
    Sencha User
    Join Date
    Oct 2008
    Posts
    2
    Vote Rating
    0
    birula is on a distinguished road

      0  

    Default


    In version 4.x behavior was changed by not allowing all columns to be hidden [1].
    I wonder how it was implemented and whether it is possible to replicate to version 3.4?


    Thank you.

    [1] - http://dev.sencha.com/deploy/ext-4.1...d-plugins.html