I'm using Q1 2011.
I simply want to change the style of a specific set of dates that are determined at runtime.
I'm overriding the ElementRender event and setting properties like e.Element.Font, e.Element.ForeColor, etc. This works great. For instance:
The problem is, from that point on, the cell will continue to render those styles even if the date inside that cell changes. (Like when the calender's month is change.)
Since the "correct" style for the cell can vary, I can't simply reset the values manually. How can I resolve this?
I simply want to change the style of a specific set of dates that are determined at runtime.
I'm overriding the ElementRender event and setting properties like e.Element.Font, e.Element.ForeColor, etc. This works great. For instance:
private
void
calSchedule_ElementRender(
object
sender, RenderElementEventArgs e)
{
if
(myDates.Contains(e.Day.Date))
{
e.Element.Font =
new
Font(e.Element.Font.FontFamily, 9f, FontStyle.Bold);
e.Element.ForeColor = Color.Green;
e.Element.AutoToolTip =
true
;
}
}
The problem is, from that point on, the cell will continue to render those styles even if the date inside that cell changes. (Like when the calender's month is change.)
Since the "correct" style for the cell can vary, I can't simply reset the values manually. How can I resolve this?