6 Dec 2012 5:47 PM #1
GroupingView Dynamic Header Style
I have a grid using a grouping view. The default grouping is on a value called type_display_name. There is also a value called type_color which is a hex color string. I'd like to make the type_color the background color of the group header. I can apply the color as a style in the template used by groupTextTpl, but that only affects the template display and I'd really like to get the color applied in either the div immediately above that (with class x-grid-group-title) or the one above that (with class x-grid-group-hd), so that the color fills the whole header row. The groupTextTpl gets passed a style value that appears to be coming from the x-grid-group-hd div. I tried having my template update that value, but it had no affect. If anyone has a suggestion for how to make this happen, I'd really appreciate the help.
8 Dec 2012 6:42 AM #2
- Join Date
- Mar 2007
- Gainesville, FL
- Vote Rating
You should have access to the records so you can use a member function to get the color.Mitchell Simoens @LikelyMitch
Sencha Inc, Senior Software Engineer
Check out my GitHub, lots of nice things for Ext JS 4 and Sencha Touch 2
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 email@example.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.
8 Dec 2012 11:43 AM #3
Yes I can get the color from the record and I can apply it to the template display. The issue is that only affects part of the group header row. I'd like to get the color applied to the whole row, which means applying the color to one of the container divs above the template output.