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

Scheduler: How does one call a server side method from event click ?

Asked by Barry O'Neill
14 years ago.

Scheduler: How does one call a server side method from event click ?

Based on my readings elsewhere in this forum, it seems one is to set the EventClickHandling to "PostBack", and then set this property in the back end code:

DayPilotSchedulerDayView.EventClick += DayPilot.Web.Ui.EventClickDelegate("DayPilotCalendar_EventClick");

...but it wont compile ("EventClickDelegate is a 'type' which is not valid in the given context").

Any hints ?....I want this to execute in my C# code:

private void DayPilotCalendar_EventClick([whatever should be in here]){

}

Comment posted by Barry O'Neill
14 years ago.

Never mind...after looking at: http://forums.daypilot.org/Topic.aspx/386/server_side_event_handling_in_daypilot_lite

The solution was simply as follows:

<DayPilot:DayPilotScheduler ID="DayPilotSchedulerDayView" runat="server"

OnEventClick="DayPilotScheduler_EventClick"

</DayPilot:DayPilotScheduler>

public void DayPilotScheduler_EventClick(object sender, DayPilot.Web.Ui.EventClickEventArgs e) {

System.Diagnostics.Debug.WriteLine("DayPilotCalendar_EventClick: " + e.Value);

}

Comment posted by Dan Letecky
14 years ago.

Thanks for posting the solution.

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