:: Forum >>

Performance hit settig grid row color

I use the following code to update the row color in a grid, it works fine but when many rows are returned there is a performance penalty.

for(var i=0;i<G1.getRowCount();i++){
G1.getRowTemplate(i).setStyle("background-color", function(){
return this.getRowProperty("Mybackcolor");

Is there a better way to update the row template without having to skip through the entire data set?

Erik Dobrie
Saturday, March 28, 2009
Yes, you can apply the style to the row template without index -

G1.getRowTemplate().setStyle("background-color", function(){
return this.getRowProperty("Mybackcolor");
Alex (ActiveWidgets)
Saturday, March 28, 2009

This topic is archived.

Back to support forum

Forum search