Home Unanswered Active Tags New Question

customize events (backcolour etc) using BeforeEventRender for Month view

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

Asked by Joe 3 years ago.
Replies
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 Dan Letecky 3 years ago.

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

regards

Joe

Comment posted by Joe 3 years ago.
New Reply
This reply is
Your name (optional):

DayPilot for ASP.NET WebForms, DayPilot for ASP.NET MVC, DayPilot for Java