3.2.0

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?

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

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

This topic is archived.

See also:


Back to support forum