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

Month Event Prerender not working

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

OMG.... sorry.

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

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

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