PDA

View Full Version : GroupingView Dynamic Header Style



slsmithtx
6 Dec 2012, 5:47 PM
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.

mitchellsimoens
8 Dec 2012, 6:42 AM
You should have access to the records so you can use a member function to get the color.

slsmithtx
8 Dec 2012, 11:43 AM
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.

40664


40665