set style of grid headers

Hi,



we are loading a grid through xml and are trying to change the colours of individual headers in the grid… and make some column headers bold, some normal, some italic etc…



we are trying to set the style of the columns in xml but the changes are not showing in the grid when it is loaded



is there anyway to do this please



thanks

You can set header’s styles through 3rd parameter of setHeader command

grid.setHeader(“a,b,c”,null,[“text-color:red;”,“text-color:green;”,“text-color:blue;”])

hi

thanks for your reply, except i explained we were doing it in xml. i have tried applying styles to the headers in xml but it is not working

thanks

the solution your provided above is if we were setting column style in javascript but we are trying to set them in xml, and it is not working correctly - the styles are not showing

When data loaded from XML , you can’t specify styles for columns directly, but you can use inline HTML for the same

<![CDATA[ Sales ]]>


hi

i dont want to change the text color of all items in a column - i just want to set the text colour of the columns header. i have tried it as you suggest using the cspan but we build up our xml docs in coldfusion and to do this we run the tostring function with converts the < symbols to &alt; etc… therefore it is not working

can you suggest how to set just the column header text colurs please

thanks

The snippet above changes the color of header cell, so basically it is execute required task
Unfortunately, while init structure from XML , the usage of inline tags in header is the only way to define custom styles in header.
If you output already xml-safe data you can use

#tostring(" Sales ")#