setting a color for a single cell

How can I set the text or background color for a single cell ?

Will appreciate any help
Adi Katz
August 23,
obj.getCellTemplate().setStyle("color", "red"); // all columns
obj.getCellTemplate(1).setStyle("color", "green"); // column-1
obj.getCellTemplate(2, 3).setStyle("color", "blue"); // column-2, row-3

Replace "color" with "background-color" for backgraound
Rick Villela
November 10,
I can find getColumnTemplate() and getRowTemplate(). But I cannot find getCellTemplate(). How can I use it?
December 8,
The message right above yours shows you the 3 ways that you can use it. What more are you looking for?
Jim Hunter
December 8,

I have same question as Satoshi. When I use getCellTemplate it gives me an error "getCellTemplate is not a function"

I am using 1.0 version. Can you tell me what should I use to change color of single cell in version 1.0

January 25,
I have the same problem. The only available download is version 1.0.2. How can I get version 2???
February 1,
There is a link on the Home Page for version 2.0 Beta. it is the very first item in the list.

I do not know how to change the color of a single cell in 1.0 and I have moved all my work over to 2.0, sorry that I can't answer the question for you all.
Jim Hunter
February 1,
You change color as follows

function myColor(){
var value = this.getItemProperty("value");
return value > 10000 ? "red" : "blue";

obj.getColumnTemplate(0).setStyle("color", myColor);

The only problem is it will go through all the rows. Even if you want only the first row.

February 2,
text color change on mouseover
February 10,

This topic is archived.

See also:

Back to support forum