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
headerCells - color in a grid
-
- Profound User
- Posts: 20
- Joined: Mon Feb 04, 2019 10:56 am
- First Name: stephane
- Last Name: villeminot
- Company Name: alcyon france
- Country: France
- Contact:
-
- Experienced User
- Posts: 2711
- Joined: Wed Aug 01, 2012 8:58 am
- First Name: Scott
- Last Name: Klement
- Company Name: Profound Logic
- City: Milwaukee
- State / Province: Wisconsin
Re: headerCells - color in a grid
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
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
Who is online
Users browsing this forum: No registered users and 5 guests