Hybrid View

  1. #1
    Sencha User
    Join Date
    Jul 2009
    Location
    Austin, TX
    Posts
    47
    Vote Rating
    0
    slsmithtx is on a distinguished road

      0  

    Default GroupingView Dynamic Header Style

    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.

  2. #2
    Sencha - Senior Forum Manager mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    37,404
    Vote Rating
    849
    mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute

      0  

    Default


    You should have access to the records so you can use a member function to get the color.
    Mitchell Simoens @SenchaMitch
    Sencha Inc, Senior Forum Manager
    ________________
    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 in print!

    When posting code, please use BBCode's CODE tags.

  3. #3
    Sencha User
    Join Date
    Jul 2009
    Location
    Austin, TX
    Posts
    47
    Vote Rating
    0
    slsmithtx is on a distinguished road

      0  

    Default


    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.

    group_header.jpg


    firebug.jpg

Thread Participants: 1

Tags for this Thread