Reputation: 88
For a project I need to work in RadPHP XE2
In this project I created a DBGRid.
This is all working fine.
Now I need to change the cell color for each cell.
The color for the cell is depending on the value inside that cell.
Like this:
if value > 0 return green else return red
Upvotes: 0
Views: 234
Reputation: 829
I think you should add the color changing code in OnBeforeShow event of the dbgrid component.
Upvotes: 0
Reputation: 688
Well here is the PHP code for what you need. =) Don't really understand your question all that well though.
if( $value > 0 ){
return "red";
}else{
return "green";
}
Upvotes: 0