Results 1 to 3 of 3

Thread: GroupingView Dynamic Header Style

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Sencha User
    Join Date
    Jul 2009
    Location
    Austin, TX
    Posts
    47
    Vote Rating
    0
      0  

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

    Default

    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
    ________________
    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
    Jul 2009
    Location
    Austin, TX
    Posts
    47
    Vote Rating
    0
      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

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
  •