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

Month Event Prerender not working

Asked by Rob
7 months 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]
7 months 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
7 months ago.

OMG.... sorry.

Comment posted by Rob
7 months 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]
7 months ago.

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

This question is more than 3 months old and has been closed. Please create a new question if you have anything to add.