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

DayPilot and scriptmanager and update panel

Asked by Anonymous
14 years ago.

i have a dypilot and a label(for example)inside an updatepanel. when i click on an event to change the text of the labelthe page makes a refresh, although i have an update panel.

Why is it like that?

Comment posted by Dan Letecky
14 years ago.
It should work well, it's a tested scenario. You can compare your page with DemoSQL/Default.aspx/.cs in the download package.

Do you get any JavaScript error?

If you post the UpdatePanel section from your .aspx I will check it.
Comment posted by Anonymous
14 years ago.
No i don`t get any lavascript error. it just refreshes the page. when i remove the script manager and the update panel it works fine. I use daypilot lite(version 2.1 i think)
Comment posted by Anonymous
14 years ago.

here is the html(nothing unusual)

<body>
<form id="form1" runat="server">
<div>
<asp:ScriptManager ID="ScriptManager1" runat="server">
</asp:ScriptManager>
<asp:UpdatePanel ID="UpdatePanel1" runat="server">
<ContentTemplate>
<asp:Button ID="Button1" runat="server" OnClick="Button1_Click" Text="Button" />
<asp:Label id="Label1" runat="server" />
<DayPilot:DayPilotCalendar ID="dpcDayView" runat="server" DataDisplayColorField="DisplayColor"
DataEndField="EndDateTime" DataExtraTextField="TeacherDisplay" DataStartField="StartDateTime"
DataTextField="ClassDisplay" DataToolTipField="ClassDisplayTextFull" DataValueField="ScheduleID"
Days="7" EventClickHandling="PostBack" HourHeight="50" OnEventClick="dpcDayView_EventClick"
Width="683px" OnDayEventRender="dpcDayView_DayEventRender" />
<br />
</ContentTemplate>
</asp:UpdatePanel>
</div>
</form>
</body>

Comment posted by Dan Letecky
14 years ago.
You will need to upgrade to DayPilot Lite 2.3. Previous versions are not compatible with UpdatePanel.

I see that you have modified the source code for your needs. It's necessary that there exists an element with the DayPilot's ClientID (i.e. you will need to add id="" attribute to the main div) on the page and that the event delegates use the standard parameters - i.e. (object sender, EventArgsDerivedClass e). Without these two modifications UpdatePanel doesn't detect DayPilotCalendar events properly.
This question is more than 3 months old and has been closed. Please create a new question if you have anything to add.