Alternate row styles in version 2.0
This was the way to alternate background colors in version 1.0 using a function based on the order of the rows.
row = new Active.Templates.Row
row.setStyle("background", function() {
return this.getProperty("row/order") % 2 ? "ghostwhite" : "white"
})
Is there a way to achieve the same functionality in version 2.0 without having to resort to long css sections like in the examples?
This is what I'm using for the row template.
objGrid = new AW.UI.Grid
objGrid.getRowTemplate().setStyle("background", function() {
return this.getProperty("row/order") % 2 ? "ghostwhite" : "white"
})
But I get a JavaScript error on the line that begins with return. Object does not accept this property or method.
Apparently this.getProperty("row/order") is no longer valid in version 2.0.
Does anyone know the equivalent for 2.0?
And as long as we are on the subject, is there any documentation regarding the property constants available? e.g. row/order, etc
Thanks in advance.
row = new Active.Templates.Row
row.setStyle("background", function() {
return this.getProperty("row/order") % 2 ? "ghostwhite" : "white"
})
Is there a way to achieve the same functionality in version 2.0 without having to resort to long css sections like in the examples?
This is what I'm using for the row template.
objGrid = new AW.UI.Grid
objGrid.getRowTemplate().setStyle("background", function() {
return this.getProperty("row/order") % 2 ? "ghostwhite" : "white"
})
But I get a JavaScript error on the line that begins with return. Object does not accept this property or method.
Apparently this.getProperty("row/order") is no longer valid in version 2.0.
Does anyone know the equivalent for 2.0?
And as long as we are on the subject, is there any documentation regarding the property constants available? e.g. row/order, etc
Thanks in advance.
Mario
February 3,