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

How to access BeforeEventRenderArgs in MVC

Asked by bob
1 month ago.

I do not see BeforeEventRenderArgs in the object browser, so can not use sample code in
https://doc.daypilot.org/calendar/event-customization/
I have the following using statement "using DayPilot.Web.Mvc.Events.Calendar;" I encounter the following error when using the below sample code.
"The type or namespace name 'BeforeEventRenderArgs' could not be found (are you missing a using directive or an assembly reference?"

public class Dpc: DayPilotCalendar {

// ...

protected override void OnBeforeEventRender(BeforeEventRenderArgs e)
{
if ((string)e.DataItem["type"] == "special") // "type" field must be available in the DataSource
{
e.CssClass = "special";
e.BackgroundColor = "lightyellow";
e.Html = "<i>WARNING: This is an unusual event.</i><br>" + e.Html;
}
}

}

Any help is greatly appreciated.

Comment posted by bob
29 days ago.

More info: I am using DayPilot.Web.Mvc.dll ver 1.5.414.0

New Reply
This reply is
Your name (optional):