3.2.0

Dynamically return the background color of a cell

I need to dynamically identify what the background color of a cell is.

For example, loop through all rows - If the cell in the first column has a blue background, I'd like to add that cell's value to a JavaScript array.

Any ideas?
andrewzoo
January 10,
I finally was able to fingure this out (I opted for getting the background color of the row, instead of the cell):

SETTING THE BACKGROUND COLOR:
obj.getRowTemplate(x).setStyle("background", "#DDDDDD");

GETTING THE BACKGROUND COLOR:
obj.getRowTemplate(x).getStyle("background")

where x is the row index. ("undefined" is returned for any row for which the background color is not explicitly set using the setStyle method).

andrewzoo
January 10,

This topic is archived.

See also:


Back to support forum