Can I change row style by setClass(className) rather than setStyle(attr, attrValue)?
Hi All,
I have seen the standard solution for controlling a row's style, as explained for controlling background colours in /grid.howto.style.rows/alternate-background-colors.html
The problem with this solution is that you end up with values for css attributes encoded throughoutyour javascript, rather than where they properly belong in a css file.
Does anyone know if there is a way I can do something like this instead?
Thanks :)
I have seen the standard solution for controlling a row's style, as explained for controlling background colours in /grid.howto.style.rows/alternate-background-colors.html
The problem with this solution is that you end up with values for css attributes encoded throughoutyour javascript, rather than where they properly belong in a css file.
Does anyone know if there is a way I can do something like this instead?
Thanks :)
// function to determine if a row should have odd or even style
var alternate = function () {
return this.getRowProperty("order") % 2 ? "active-templates-row-even" : "active-templates-row-odd";
}
var row = new Active.Templates.Row;
[b]row.setClass( alternate );[/b]
obj.setTemplate("row", row);
Simon
September 5,