I have a RadListBox that allows reordering and requires alternate row coloring.
OnClientLoad and OnClientReordered events call a function in javascript that applies alternate row coloring.
var x = document.getElementsByTagName("li");
for (i = 0; i < x.length; i++) {
if (i % 2 == 0) {
x[i].style.backgroundColor = "#EFF3FB";
}
else {
x[i].style.backgroundColor = "white";
}
}
This had to be done on client side since we can't enable autopostback for performance reasons.
This works, however it disables the hover and selected background color default behavior.
Also, is there a way I can change the CssClass of each item of the RadListBox through the sender object of the OnClientLoad and OnClientReordered events?
Thank you for your assistance.