Aug 26, 2011, 9:47 AM
[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.
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]