Update Calendar from UpdatePanel button and vice versa
Hi, just started to work with your trial, Love it!!
some questions, let me first show you some code:
<asp:UpdatePanel ID="uplEdit" runat="server" UpdateMode="Conditional">
<ContentTemplate>
<asp:Literal ID="ltlEdit" runat="server" />
<asp:Button ID="btnAdd" runat="server" Text="Add" OnClick="BtnAdd_Click" />
<br />
</ContentTemplate>
</asp:UpdatePanel>
<Daypilot:Daypilotcalendar
Id="dpcCalendar"
runat="server"
EventClickHandling="CallBack"
OnEventClick="DpcCalendar_EventClick"
/>
------------------
and code-behind:
protected void DpcCalendar_EventClick(object sender, DayPilot.Web.Ui.Events.EventClickEventArgs e)
{
ltlEdit.Text = DateTime.Now.ToLongTimeString() + " id: " + e.Value;
uplEdit.Update();
}
protected void BtnAdd_Click(object sender, EventArgs e)
{
FPCalendarEventFacad.CreateNewCalendarEvent(UserSession.CmrId, "from up", string.Empty, DateTime.Parse("2007-12-05 14:00"), DateTime.Parse("2007-12-05 16:00"), UserSession.UserId);
List<FPCalendarEvent> calList = FPCalendarEventFacad.GetCalenderEventListByCmrId(UserSession.CmrId, this.FPStartDate, this.FPEndDate);
BindCalendar(this.FPStartDate, calList, this.FPNumDays);
dpcCalendar.Update();
}
--------------------
I guess you already know my question =)
How can I update calendar after button inside the update panel is fired?
and the other way, I want to show some data about the event in the update panel when event is clicked in calendar.
I found a work around, I put the whole calendar inside the update panel and changed CallBack to PostBack.
That worked, but it's so much slower, when doing this, all action on all events are so much slower.
Can this be done on some other way? or maybe in a future release?
Asked by Jimmie Andersson 4 years ago.