[CLOSED] Change grid header color

  1. #1

    [CLOSED] Change grid header color

    Hi, I have a requirement to change the column heading color of my grid panel, I tried it using

    COL.Header = <div style='background-color:red' class='colorHead'> Sometext </div>

    But I cant change the color of the whole header, since it is wrapeed inside a td which is genereated by extjs.

    I also tried using ext.query and retrieved the "wrapper td" (the element which wraps the div) when i set the background color of this td, or i try to remove the class attribute it is not working.



    tp_coordination is a tabpanel in which the grid is present.
    tp_coordination.AddScript("var x = Ext.query('.colorHead'); Ext.each(x,function(item,index){  item.parentElement.parentElement.parentElement.removeAttribute('class'); }); ");
    colorhead [mydiv]=>parent [another div] (gen.auto)=>parent link (gen.auto) =>parent the td for which i need to set the bg color.Note. I tried the bgcolor prop, style, nothing works. I ensure that I got the right element (the td) and inspected in debug mode. For me the problem seems to lie when this gets executed, So I also tried Ext.Ready and all.. Nothing works .. Frustrated.. Any help will be appreciable in this regard.
    Last edited by geoffrey.mcgill; Aug 26, 2011 at 9:16 PM. Reason: [CLOSED]
  2. #2
    See the following sample is demonstraed how to customize grid headers look
    https://examples1.ext.net/#/GridPane...ous/Custom_UI/

Similar Threads

  1. how to change color panel header?
    By HosseinHelali in forum 1.x Help
    Replies: 3
    Last Post: Jan 15, 2014, 11:49 PM
  2. [CLOSED] Change grid cell color
    By BGeorge in forum 1.x Legacy Premium Help
    Replies: 7
    Last Post: Dec 12, 2011, 5:05 AM
  3. how to change the header color of a panel
    By joydeepsen in forum 1.x Help
    Replies: 3
    Last Post: Jul 09, 2011, 9:23 PM
  4. [CLOSED] Change grid cell color on fly
    By 78fede78 in forum 1.x Legacy Premium Help
    Replies: 1
    Last Post: Dec 03, 2010, 1:27 PM
  5. [CLOSED] Change current row color in grid
    By Jurke in forum 1.x Legacy Premium Help
    Replies: 4
    Last Post: Jan 21, 2009, 1:06 PM

Tags for this Thread

Posting Permissions