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

Getting OnBeforeEventRender to fire for Month

Asked by John
12 years ago.

Can't seem to get the OnBeforeEventRender to fire for the Daypilot Month. No errors, just doesn't seem to get called.

I did set the OnBeforeEventRender="DayPilotMonth1_BeforeEventRender"

and have the code:
protected void DayPilotMonth1_BeforeEventRender(object sender, DayPilot.Web.Ui.Events.BeforeEventRenderEventArgs e)
{
Response.Write("SOMETHIN");
}

anything missing?

Thanks,
John

Answer posted by Dan Letecky [DayPilot]
12 years ago.

The event handler is invoked correctly but this call will not do anything, Response.Write() is not allowed there. You can check it by modifying the event:

e.InnerHTML = "test";
e.BackgroundColor = "red";

Comment posted by SolzIT
12 years ago.

e.e.BackgroundColor is not taking affect. My code is:

<DayPilot:DayPilotMonth
ID="dpMonth"
runat="server"
DataEndField="end"
DataStartField="start"
DataTextField="name"
DataValueField="id"
DataTagFields="name, id"
EventClickHandling="ContextMenu"
EventClickJavaScript="alert(e.text());"
ClientObjectName="dpm"
BubbleID="DayPilotBubble1"
ShowToolTip="false"
EventStartTime="false"
EventEndTime="false"
CssClassPrefix="month_blue"
CssOnly="true"
HeaderHeight="25"
EventHeight="25"
TimeRangeDoubleClickHandling="JavaScript"
TimeRangeDoubleClickJavaScript="alert('doubleclick:' + start)"
OnBeforeEventRender="DayPilotMonth1_BeforeEventRender">

protected void DayPilotMonth1_BeforeEventRender(object sender, DayPilot.Web.Ui.Events.Month.BeforeEventRenderEventArgs e)
{
e.BackgroundColor = "black";
}

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