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

customize events (backcolour etc) using BeforeEventRender for Month view

Asked by Joe
16 years ago.

I have attempted to use BeforeEventRender for changing background colour in the month view however this event is not being triggered. My code is as follows:

Protected Sub DayPilotMonthX_BeforeEventRender(ByVal sender As Object, ByVal e As DayPilot.Web.Ui.Events.BeforeEventRenderEventArgs) 

Response.Write("red")
e.BackgroundColor = "red"

End Sub

It is also mentioned in the DayPilot:

<DayPilot:DayPilotMonth ID="DayPilotMonth" 
...
BeforeEventRender="DayPilotMonthX_BeforeEventRender"
EventClickHandling="PostBack" DataTagFields="Deleted"/>

However it is not responding. Any ideas?

Thanks

Joe

Comment posted by Dan Letecky
16 years ago.
1. Please try adding Handles .... section to the header:
Protected Sub DayPilotMonthX_BeforeEventRender(ByVal sender As Object, _
ByVal e As DayPilot.Web.Ui.Events.BeforeEventRenderEventArgs) _
Handles DayPilotMonthX.BeforeEventRender

2. Another option might be to change BeforeEventRender to OnBeforeEventRender in the .aspx source:

OnBeforeEventRender="DayPilotMonthX_BeforeEventRender" 
Let me know if it didn't help.
Comment posted by Joe
16 years ago.

Many thanks Dan - It was the 'On' that was missing

regards

Joe

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