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 - Sr Software Engineer mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    39,551
    Answers
    3931
    Vote Rating
    1271
      0  

    Default

    Code:
    .x-grid-group-hd-collapsed .x-grid-group-title {
        background-image: none;
    }
    Mitchell Simoens @LikelyMitch
    Sencha Inc, Senior Software Engineer
    ________________
    Learn BBCode and use it! Checkout the CODE tag!

    Check out my GitHub, lots of nice things for Ext JS and Sencha Touch
    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 - Sr Software Engineer mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    39,551
    Answers
    3931
    Vote Rating
    1271
      0  

    Default

    Have you inspected the DOM to see if your CSS is on the correct element?
    Mitchell Simoens @LikelyMitch
    Sencha Inc, Senior Software Engineer
    ________________
    Learn BBCode and use it! Checkout the CODE tag!

    Check out my GitHub, lots of nice things for Ext JS and Sencha Touch
    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
  •