Home Unanswered Active Tags New Question

How to stop flickering of DayPilotCalendar in updatePanel

Hello All,

I have two DayPilotCalendar cotrols on my web page.
Both are in different update panel. On checkbox change i am updating both of them.
But I found that first DayPilotCalendar is comming ok,but the secod is flickering.
so can someone tell me how to stop flickering of second DayPilotCalendar.

following is the code.
<tr>
<td>
<asp:UpdatePanel ID="UpdatePanelCalendar" runat="server" UpdateMode="Conditional"
ChildrenAsTriggers="false">
<ContentTemplate>
<asp:CheckBoxList ID="chkClinicList" runat="server" AutoPostBack="true" OnSelectedIndexChanged="chkClinicList_SelectedIndexChanged"
AppendDataBoundItems="true">
<asp:ListItem Text="one" Value="1"></asp:ListItem>
<asp:ListItem Text="two" Value="2"></asp:ListItem>
<asp:ListItem Text="three" Value="3"></asp:ListItem>
<asp:ListItem Text="four" Value="4"></asp:ListItem>
</asp:CheckBoxList>
</ContentTemplate>
</asp:UpdatePanel>
</td>
<td>
<asp:UpdatePanel ID="UpdatePanel1" runat="server" UpdateMode="Conditional" ChildrenAsTriggers="false">
<ContentTemplate>
<DayPilot:DayPilotCalendar ID="DayPilotCalendar1" runat="server" ClientObjectName="dpc1"
HourNameBackColor="#ECE9D8" BorderColor="#A0A0A0" CellBorderColor="#A0A0A0" EventBorderColor="#505050"
AllDayEventBorderColor="#a0a0a0" TimeRangeSelectedHandling="PostBack" EventClickHandling="PostBack"
EventDeleteHandling="JavaScript" EventResizeHandling="CallBack" EventMoveHandling="CallBack"
Width="200">
</DayPilot:DayPilotCalendar>
</ContentTemplate>
</asp:UpdatePanel>
</td>
<td>
<asp:UpdatePanel ID="UpdatePanel2" runat="server" UpdateMode="Conditional" ChildrenAsTriggers="false">
<ContentTemplate>
<DayPilot:DayPilotCalendar ID="DayPilotCalendar2" runat="server" ClientObjectName="dpc1"
HourNameBackColor="#ECE9D8" BorderColor="#A0A0A0" CellBorderColor="#A0A0A0" EventBorderColor="#505050"
AllDayEventBorderColor="#a0a0a0" TimeRangeSelectedHandling="PostBack" EventClickHandling="PostBack"
EventDeleteHandling="JavaScript" EventResizeHandling="CallBack" EventMoveHandling="CallBack"
Width="200">
</DayPilot:DayPilotCalendar>
</ContentTemplate>
</asp:UpdatePanel>
</td>
</tr>

server side code
protected void chkClinicList_SelectedIndexChanged(object sender, EventArgs e)
{
UpdatePanel1.Update();
UpdatePanel2.Update();
}

thanks in advance

Asked by harshad jadhav 10 months ago.
Replies

Is it flickering during update only?

Comment posted by Dan Letecky [DayPilot] 10 months ago.

yes it only gives the problem when update. i have binded the values in following manner

Server side code on checkBox click
protected void chkClinicList_SelectedIndexChanged(object sender, EventArgs e)
{
DayPilotCalendar1.DataSource = fnGetRecordsBasedOnCritria(strDoctorId, strClinicListId);
DayPilotCalendar1.DataBind();

DayPilotCalendar2.DataSource = fnGetWaitingRecordsBasedOnCritria(strDoctorId, strClinicListId);
DayPilotCalendar2.DataBind();

UpdatePanel1.Update();
UpdatePanel2.Update();
}

Comment posted by harshad jadhav 10 months ago.

If you place the Calendar inside an UpdatePanel it gets redrawn completely during update. Different browsers may be able to handle it differently (IE is not very good at smooth redrawing). The page layout may also have some influence (you can try it with a plain page).

I would recommend switching to CallBack updates. Even full update doesn't redraw everything so it will be faster and smoother.

See also here (this doc page is for Scheduler but you can use the same mechanism with Calendar):

http://www.daypilot.org/scheduler-commandcallback.html

Answer posted by Dan Letecky [DayPilot] 10 months ago.

I have to filter the data in the calender based on the check boxes clicked.
Can you tell me how to do that using commandcallback. based on the check on the checkbox.

Thanks in advance

Harshad

Comment posted by Anonymous 10 months ago.
New Reply
This reply is
Your name (optional):

DayPilot for ASP.NET WebForms, DayPilot for ASP.NET MVC, DayPilot for Java