1. #1
    Sencha User
    Join Date
    Feb 2012
    Posts
    26
    Vote Rating
    0
    suryanarendra is on a distinguished road

      0  

    Default Unanswered: Hide collapse/Expand button in Group header in Grid panel

    Unanswered: Hide collapse/Expand button in Group header in Grid panel


    Hi,

    In grid I would like to retain grouping feature along with groupHeaderTpl (Currently showing some custom text in the headers) , but want to hide [+/-] button in the header.

    I tried with css styles but not able to get it. Can somebody help me to achieve this.

    Thanks & Regards,
    Nari

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


    Code:
    .x-grid-group-hd-collapsed .x-grid-group-title {
        background-image: none;
    }
    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
    Feb 2012
    Posts
    26
    Vote Rating
    0
    suryanarendra is on a distinguished road

      0  

    Default


    I would like to apply this to only one of my Grid but not to all, so it must be custom to its grid.
    All groups will be auto expanded always, so which css property I need to set in group header to get this.

    I tried hdCollapsedCls: 'mytestclass' but its not working.

    css class:

    .mytestclass .x-grid-group-hd-collapsed .x-grid-group-title {
    background : none !important;
    background-image: none !important;
    }

  4. #4
    Sencha - Senior Forum Manager mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    37,206
    Answers
    3516
    Vote Rating
    856
    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


    Have you inspected the DOM to see if your CSS is on the correct element?
    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.

  5. #5
    Sencha User
    Join Date
    Feb 2012
    Posts
    26
    Vote Rating
    0
    suryanarendra is on a distinguished road

      0  

    Default


    I inspected the DOM and the problem is that CSS is not getting applied to the element after setting hdCollapsedCls to my custom css class.

  6. #6
    Sencha User
    Join Date
    Feb 2012
    Posts
    26
    Vote Rating
    0
    suryanarendra is on a distinguished road

      0  

    Default


    The way I defined grouping is

    this.groupingFeature = Ext.create('Ext.grid.feature.GroupingSummary', {
    startCollapsed:false,
    hdCollapsedCls:"mytestclass",
    groupHeaderTpl:'Number: {[values.rows[0].data.xxx]}'
    });


    Ext.applyIf(me, {

    ......
    features:[this.groupingFeature],
    .....
    });

    From firebug I can see my custom css class got loaded but not applied to the group header.

Thread Participants: 1

Tags for this Thread