Page 1 of 1
headerCells - color in a grid
Posted: Thu Sep 03, 2020 11:45 am
by svi
Hello,
With headerCells.title you can modify the tool tip of a grid - is there an equivalent trick to modify either the background color or the text color
Thank you
Re: headerCells - color in a grid
Posted: Thu Sep 03, 2020 1:24 pm
by Scott Klement
It sounds like you're modifying the DOM element directly instead of using Profound's features to do so?
There is a risk in doing that. It requires you to understand the underlying HTML tags, et al. If Profound should change the way the grid works by changing the HTML tags it outputs, your code would break until you went and modified it. If you do this on many screens, this could be a lot of work to test and maybe fix things each time you upgrade Profound UI.
Therefore, I would recommend using Profound's published interfaces, instead. Use the "header font color" and "header background" properties to set the colors. If you do it this way, Profound will make sure that any updates are compatible.
If you would prefer to update the DOM elements, anyway, and are willing to accept the risks that I describe above... The DOM objects have a "style" object on them that has fields for color and backgroundColor.
https://www.w3schools.com/jsref/prop_st ... dcolor.asp
https://www.w3schools.com/jsref/prop_style_color.asp