AW.UI.List alternate colours
Hi, I was wondering how to get alternate background colours for the aw.ui.list? I have tried using a similar approach as used in the grid but I couldn't get it to work,
Any help would be great! Cheers!
James Crow
January 7,
Define odd/even colors in CSS:
.aw-alternate-even {
background: red;
}
Add 'alternate' class to the list item template:
var obj = new AW.UI.List;
...
function alternate(){
return this.getViewProperty("position") % 2 ? "odd" : "even";
}
obj.getItemTemplate().setClass("alternate", alternate);
...
Alex (ActiveWidgets)
January 8,
Cheers alex! Works a treat! Just wish I could have found it myself in documentation :(
January 9,