Results 1 to 6 of 6

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

  1. #1
    Sencha User
    Join Date
    Feb 2012
    Posts
    26
    Vote Rating
    0
      0  

    Default 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 User mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    40,029
    Answers
    3976
    Vote Rating
    1367
      0  

    Default

    Code:
    .x-grid-group-hd-collapsed .x-grid-group-title {
        background-image: none;
    }
    Mitchell Simoens @LikelyMitch
    Modus Create, Senior Frontend Engineer
    ________________
    Need any sort of Ext JS help? Modus Create is here to help!

    Check out my GitHub:
    https://github.com/mitchellsimoens

  3. #3
    Sencha User
    Join Date
    Feb 2012
    Posts
    26
    Vote Rating
    0
      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 User mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    40,029
    Answers
    3976
    Vote Rating
    1367
      0  

    Default

    Have you inspected the DOM to see if your CSS is on the correct element?
    Mitchell Simoens @LikelyMitch
    Modus Create, Senior Frontend Engineer
    ________________
    Need any sort of Ext JS help? Modus Create is here to help!

    Check out my GitHub:
    https://github.com/mitchellsimoens

  5. #5
    Sencha User
    Join Date
    Feb 2012
    Posts
    26
    Vote Rating
    0
      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
      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.

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •