Hi Marc
mboegem wrote:Hi Robert,
there's very little information you've exposed in order to get your question answered.
So just a lucky guess here:
These are both style-classes in you style sheet?
Then I'd say whether it's best to use one or the other is depending on any other style properties which are applied in these classes.
In general using style classes for odd/even rendering is more efficient than using onRender or even the rowBgCalculation event handler we used to have back in the days.
Yes, I have both style-classes in my style sheet. The form.alternate odd | even and form.grid odd | even lead to the same result (when applied on the form) but I am asking myself is there one of them better suited, i. e. more flexible for certain yet not known future requirements?
Part of the style sheet look like this:
- Code: Select all
/* FORM STYLES */
form, odd, even {
background-color: transparent;
}
form.alternate odd {
border-color: #f0f7ff;
border-width: 0px 0px 1px 0px;
}
form.alternate even {
background-color: #fcfdff;
border-color: #f0f7ff;
border-width: 0px 0px 1px 0px;
}
form selected {
background-color: #b5d5ff;
}
form.grid {
border-color: #eeeeff;
}
form.grid odd {
background-color: #ffffff;
border-color: #f0f0f5;
border-width: 0px 0px 1px 0px;
}
form.grid even {
background-color: #ffffff;
border-color: #f0f0f5;
border-width: 0px 0px 1px 0px;
}
form.grid selected {
background-color: #b5d5ff;
}
Regards,