1. #1
    Ext User
    Join Date
    Sep 2007
    Posts
    7
    Vote Rating
    0
    stmgold is on a distinguished road

      0  

    Default changing the grid column header color

    changing the grid column header color


    I am new to ext and i need to change the color of few grid column header, to mark that the fields are required fields. Any pointers/links will be of great help.

    thanks.

  2. #2
    Sencha - Ext JS Dev Team evant's Avatar
    Join Date
    Apr 2007
    Location
    Sydney, Australia
    Posts
    17,067
    Vote Rating
    660
    evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute

      0  

    Default


    When a grid is created, Ext generates a stylesheet for each grid. Use firebug to inspect it to figure out the style you need to override.

  3. #3
    Sencha - Ext JS Dev Team Animal's Avatar
    Join Date
    Mar 2007
    Location
    Notts/Redwood City
    Posts
    30,508
    Vote Rating
    58
    Animal has a spectacular aura about Animal has a spectacular aura about Animal has a spectacular aura about

      0  

    Default


    All grid cells including header cells will get a CSS class "x-grid-td-??" where ?? is the id you specified in the ColumnModel (This defaults to the column's index).

    Header cells will also get "x-grid-hd", so use a selector like

    Code:
    .x-grid-hd.x-grid-td-1 {
    }

  4. #4
    Ext User
    Join Date
    Sep 2007
    Posts
    7
    Vote Rating
    0
    stmgold is on a distinguished road

      0  

    Default


    Thanks Ext Support Team... it is working ...

  5. #5
    Sencha User
    Join Date
    Feb 2009
    Location
    India
    Posts
    11
    Vote Rating
    0
    sandeepan is on a distinguished road

      0  

    Default


    in current EXTJS Version2.X onwards it has changed to

    older css class => .x-grid-hd.x-grid-td-??? { ... }

    new css class => .x-grid3-hd.x-grid3-td-??? { ... }

    where ??? is the id of the grid column as mentioned by Animal

Thread Participants: 3