:: Forum >>

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
Thursday, January 10, 2008
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
Thursday, January 10, 2008

This topic is archived.


Back to support forum

Forum search