-
12 Nov 2012 5:41 PM #1
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
-
14 Nov 2012 10:10 AM #2Sencha - Senior Forum Manager
- Join Date
- Mar 2007
- Location
- St. Louis, MO
- Posts
- 33,714
- Vote Rating
- 438
- Answers
- 3113
Code:.x-grid-group-hd-collapsed .x-grid-group-title { background-image: none; }Mitchell Simoens @SenchaMitch
Sencha Inc, Senior Forum Manager
________________
http://www.JSONPLint.com - Source to lint your JSONP!
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 almost in print!
When posting code, please use BBCode's CODE tags.
-
14 Nov 2012 11:37 AM #3
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;
}
-
14 Nov 2012 12:29 PM #4Sencha - Senior Forum Manager
- Join Date
- Mar 2007
- Location
- St. Louis, MO
- Posts
- 33,714
- Vote Rating
- 438
- Answers
- 3113
Have you inspected the DOM to see if your CSS is on the correct element?
Mitchell Simoens @SenchaMitch
Sencha Inc, Senior Forum Manager
________________
http://www.JSONPLint.com - Source to lint your JSONP!
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 almost in print!
When posting code, please use BBCode's CODE tags.
-
14 Nov 2012 12:38 PM #5
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.
-
14 Nov 2012 12:51 PM #6
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.


Reply With Quote