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

AJAX and the rest of AJAX functions

Asked by Michae´l
17 years ago.


I have downloaded a TRIAL Version 3.5 and I want to implement this calender. But I have open issues:

If I click on a event I will make a panel visible. With the callback I cant do this. The Code will execute but the panel is not visible!

If I try this with post-backs -- all works fine.

The same issue is with all events.

I work with the Microsoft AJAX Framework but for this it dont help me :(



Comment posted by Dan Letecky
17 years ago.
Hi Michael: So you want to update another control upon an event click using an AJAX call.

You will need to handle the event using JavaScript and call the panel update from there. I will check how to do this using Microsoft AJAX framework and I'll post the code here.

If you want to discuss it directly please contact me at daypilot @
Comment posted by Dan Letecky
17 years ago.
This should work:

1. Place ASP.NET AJAX script manager on the page:

<asp:ScriptManager ID="ScriptManager1" runat="server"></asp:ScriptManager>

2. Place ASP.NET AJAX UpdatePanel on the page:

<asp:UpdatePanel ID="UpdatePanel1" runat="server" UpdateMode="Conditional">
<asp:Label ID="Label1" runat="server" Text="Label"></asp:Label>
<asp:AsyncPostBackTrigger ControlID="DayPilotCalendar1" EventName="TimeRangeSelected" />

Remember to specify the trigger (in bold).

3. Place DayPilotCalendar control on the page (outside of the UpdatePanel).

<DayPilot:DayPilotCalendar ID="DayPilotCalendar1" runat="server" OnTimeRangeSelected="DayPilotCalendar1_TimeRangeSelected"

Remember to set TimeRangeSelectedHandling to PostBack.

4. Add the event handler to the page code:

protected void DayPilotCalendar1_TimeRangeSelected(object sender, DayPilot.Web.Ui.Events.TimeRangeSelectedEventArgs e)
Label1.Text = e.Start + "-" + e.End;

This example shows how to show selected time range in the UpdatePanel but you can change it to work with any event. Just remember that the handling must be set to PostBack because it's required by ASP.NET AJAX framework.

Let me know if there are any problems with this example.
This question is more than 1 months old and has been closed. Please create a new question if you have anything to add.