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

DayPilotScheduler and BeforeEventRender

Asked by Dario
4 years ago.

Hello,

I'm trying to implement the method BeforeEventRender and I have an issue :

Compiler Error Message: CS0123: No overload for 'DayPilotScheduler1_BeforeEventRender' matches delegate 'BeforeEventRenderEventHandler'

My c# :

protected void DayPilotScheduler1_BeforeEventRender(object sender, BeforeEventRenderEventArgs e)
{
e.BackgroundColor = (string)e.DataItem["color"];
}

my webform :

OnBeforeEventRender="DayPilotScheduler1_BeforeEventRender"

I think that I have to use something else than "OnBeforeEventRender", but if yes, what ? :s

Thank you guys.

Dario

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

This is correct, just make sure that BeforeEventRenderEventArgs is imported from the correct namespace (DayPilot.Web.Ui.Events.Scheduler). You can also specify it explicitly:

protected void DayPilotScheduler1_BeforeEventRender(object sender, DayPilot.Web.Ui.Events.Scheduler.BeforeEventRenderEventArgs e) 
{ 
e.BackgroundColor = (string)e.DataItem["color"]; 
}
Comment posted by Dario
4 years ago.

This is great !!! THX !!!

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