Cell Color (Excel's conditional formatting)

Dear members,

I have a grid full of data populated from a mysql database. (so i dont use xml).
I would like to have every cell containing the word “green” to get cell background color green.
Also i would like to have every cell containing the word “red” to get cell background color red.

Actually i just wanna do exactly the same thing like Office Excel’s conditional formatting.
I googled alot, read almost all forums, but cant get it done.

Could somebody please help?

Thanks in advance!!

You can create custom eXcell type which will checks cell’s value and change cell’s background color based on cell value. Please find tutorial here dhtmlx.com/docs/products/dht … ormat.html

Thanks for your reply!

It is almost exactly like I want.
Just a little detail, is it also possible to set the TD color?
Now only the text in the cell turns red, i want the complete cell to turn red.

Any idea’s?

You can use “background-color” css style to set the TD color:

if(some_condition()) this.cell.style.backgroundColor="red"; else this.cell.style.backgroundColor="green";

Olga,

Many, many many thanks!

Cheers,

Sander