Results 1 to 3 of 3

Thread: Custom style for HeaderGroupConfig?

  1. #1
    Sencha User Bear_On_Fire's Avatar
    Join Date
    Feb 2014
    Location
    Ukraine, Kiev
    Posts
    7
    Answers
    1

    Default Custom style for HeaderGroupConfig?

    I want to set custom CSS style for HeaderGroupConfig. How I can do this? Extend native Sencha HeaderGroupConfig class and add classname in ColumnHeaderApperance?

  2. #2
    Touch Premium Member
    Join Date
    Mar 2008
    Location
    Morgan Hill, CA
    Posts
    138

    Default

    Did you ever get a response or figure it out?

  3. #3
    Sencha Sr Product Manager
    Join Date
    Jan 2012
    Location
    Arlington, WA
    Posts
    1,149
    Answers
    12

    Default

    Using the DomQuery to select the colspan node and changing it style could be used to do it.

    Code:
        final Grid<Stock> grid = new Grid<Stock>(store, cm);
    
    
        // TODO only inject once
        StyleInjector.inject(".bgColor {background-image:none !important; background-color: red !important;}", true);
    
    
        Scheduler.get().scheduleDeferred(new ScheduledCommand() {
          @Override
          public void execute() {
            // find the first colspan in the tds and add a style name
            Element tdGroup = grid.getView().getHeader().getElement().select("td[colspan]").getItem(0);
            tdGroup.addClassName("bgColor");
          }
        });

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
  •