Hi krishnan,
The event source object (from DataSource) is available in BeforeEventRender event handler as e.DataItem (e.DataItem.Source).
Example:
protected void DayPilotCalendar1_BeforeEventRender(object sender, BeforeEventRenderEventArgs e)
{
e.DurationBarColor = e.DataItem["color"] as string;
}
You can also specify custom fields using DataTagFields property. These fields will be available during all the event lifecycle (on the client side as well).
Example:
.aspx
<DayPilot:DayPilotCalendar .... DataTagFields='color' ... />
.aspx.cs
protected void DayPilotCalendar1_BeforeEventRender(object sender, BeforeEventRenderEventArgs e)
{
e.DurationBarColor = e.Tag["color"];
}