search envelope-o feed check
Home Unanswered Active Tags New Question
user comment-o

Month Event Prerender not working

Asked by Rob
17 days ago.

Trying to change font color in the BeforeEventRender for a Monthly event calendar. At this point it's really just the following code:
Protected Sub DayPilotMonth1_BeforeEventRender(ByVal sender As Object, ByVal e As BeforeEventRenderEventArgs)

e.fontcolor="red"

End Sub

With BeforeEventRender="DayPilotMonth1_BeforeEventRender" on the control.

Nothing changes and the font is the same default black.

Answer posted by Dan Letecky [DayPilot]
17 days ago.

You'll need to change the attribute to:

OnBeforeEventRender="DayPilotMonth1_BeforeEventRender"

or add "Handles" to the the method signature:

Protected Sub DayPilotMonth1_BeforeEventRender(ByVal sender As Object, ByVal e As BeforeEventRenderEventArgs) Handles DayPilotMonth1.BeforeEventRender
'...
Comment posted by Rob
17 days ago.

OMG.... sorry.

Comment posted by Rob
17 days ago.

While we're at it ... is there any way to programmatically change the height of an event depending on the content? like if the content of the "name" of the event is 2 lines you expand the event height to fit?

Comment posted by Dan Letecky [DayPilot]
17 days ago.

Unfortunately not, in the DayPilotMonth control all events always have the same height.

New Reply
This reply is
Your name (optional):