:: Forum >>

before grid is created need row color based on column cell text

Before I write the grid I need to change the row color to red,
if the column cell text is > 1. How can I do this ???
Tuesday, May 18, 2004
I could use this answer also... been trying and trying, thought of formating it with HTML before I Load it, but then sorting is a PAIN
Travis Harris
Wednesday, November 10, 2004
One way, I think

function getRowColor(pData){
if(pData==1) return 'red';
else return 'white';

function myRowColor(){
var value = //write here the code to get the cell vallue or whatever;
try{return getRowColor(value);}catch(error){}
return this.getProperty('background');

grid.getTemplate('row', 0).setStyle('background-color', myRowColor);
Thursday, November 11, 2004

This topic is archived.

Back to support forum

Forum search