Hi All,
We have implemented code in our application from http://demos.telerik.com/aspnet-ajax/scheduler/examples/radtooltip/defaultcs.aspx.
And its working properly for single same month but when we navigate to any other months then its not working.
aspx Code is:
<ContentTemplate>
<telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" runat="server" />
<telerik:RadScheduler runat="server" ID="RadScheduler1" Height="600px" StartEditingInAdvancedForm="false"
ShowFooter="false" TimeZoneOffset="05:30:00" DayStartTime="00:00:01" SelectedView="MonthView" ShowViewTabs="false"
DayEndTime="23:59:59" FirstDayOfWeek="Monday" LastDayOfWeek="Sunday" EnableDescriptionField="true" AllowEdit="false" AllowInsert="false"
OnDataBound="RadScheduler1_DataBound" DataKeyField="EventID" DataSubjectField="EventName" DataStartField="EventDate" DataEndField="EventDate"
Width="100%" OnNavigationComplete="RadScheduler1_NavigationComplete" OnAppointmentDataBound="RadScheduler1_AppointmentDataBound"
AllowDelete="false" onappointmentcreated="RadScheduler1_AppointmentCreated">
<%--<AdvancedForm modal="true" />--%>
<TimelineView UserSelectable="false" />
<ResourceStyles>
<telerik:ResourceStyleMapping Type="Calendar" Text="Development" ApplyCssClass="rsCategoryGreen" />
<telerik:ResourceStyleMapping Type="Calendar" Text="Marketing" ApplyCssClass="rsCategoryRed" />
<telerik:ResourceStyleMapping Type="Calendar" Text="Work" ApplyCssClass="rsCategoryOrange" />
</ResourceStyles>
</telerik:RadScheduler>
<telerik:RadToolTipManager runat="server" ID="RadToolTipManager1" Width="300" Height="100"
Animation="None" HideEvent="LeaveToolTip" Text="Loading..." RelativeTo="Element"
OnAjaxUpdate="RadToolTipManager1_AjaxUpdate" OnClientBeforeShow="clientBeforeShow" BackColor="#390f12"
/></ContentTemplate>
and cs code is:
protected void RadToolTipManager1_AjaxUpdate(object sender, Telerik.Web.UI.ToolTipUpdateEventArgs args)
{
this.UpdateToolTip(args.Value, args.UpdatePanel);
}
private void UpdateToolTip(string elementID, UpdatePanel panel)
{
int aptId;
Appointment apt;
try
{
if (!int.TryParse(elementID, out aptId))//The appoitnment is occurrence and FindByID expects a string
apt = RadScheduler1.Appointments.FindByID(elementID);
else //The appointment is not occurrence and FindByID expects an int
apt = RadScheduler1.Appointments.FindByID(aptId);
EventDetails toolTip = (EventDetails)LoadControl("EventDetails.ascx");
toolTip.TargetAppointment = apt;
panel.ContentTemplateContainer.Controls.Add(toolTip);
}
catch (Exception ex)
{
objbbCommon.WriteError(ex.Message.ToString());
}
}
Thanks in advance for your support.
We have implemented code in our application from http://demos.telerik.com/aspnet-ajax/scheduler/examples/radtooltip/defaultcs.aspx.
And its working properly for single same month but when we navigate to any other months then its not working.
aspx Code is:
<ContentTemplate>
<telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" runat="server" />
<telerik:RadScheduler runat="server" ID="RadScheduler1" Height="600px" StartEditingInAdvancedForm="false"
ShowFooter="false" TimeZoneOffset="05:30:00" DayStartTime="00:00:01" SelectedView="MonthView" ShowViewTabs="false"
DayEndTime="23:59:59" FirstDayOfWeek="Monday" LastDayOfWeek="Sunday" EnableDescriptionField="true" AllowEdit="false" AllowInsert="false"
OnDataBound="RadScheduler1_DataBound" DataKeyField="EventID" DataSubjectField="EventName" DataStartField="EventDate" DataEndField="EventDate"
Width="100%" OnNavigationComplete="RadScheduler1_NavigationComplete" OnAppointmentDataBound="RadScheduler1_AppointmentDataBound"
AllowDelete="false" onappointmentcreated="RadScheduler1_AppointmentCreated">
<%--<AdvancedForm modal="true" />--%>
<TimelineView UserSelectable="false" />
<ResourceStyles>
<telerik:ResourceStyleMapping Type="Calendar" Text="Development" ApplyCssClass="rsCategoryGreen" />
<telerik:ResourceStyleMapping Type="Calendar" Text="Marketing" ApplyCssClass="rsCategoryRed" />
<telerik:ResourceStyleMapping Type="Calendar" Text="Work" ApplyCssClass="rsCategoryOrange" />
</ResourceStyles>
</telerik:RadScheduler>
<telerik:RadToolTipManager runat="server" ID="RadToolTipManager1" Width="300" Height="100"
Animation="None" HideEvent="LeaveToolTip" Text="Loading..." RelativeTo="Element"
OnAjaxUpdate="RadToolTipManager1_AjaxUpdate" OnClientBeforeShow="clientBeforeShow" BackColor="#390f12"
/></ContentTemplate>
and cs code is:
protected void RadToolTipManager1_AjaxUpdate(object sender, Telerik.Web.UI.ToolTipUpdateEventArgs args)
{
this.UpdateToolTip(args.Value, args.UpdatePanel);
}
private void UpdateToolTip(string elementID, UpdatePanel panel)
{
int aptId;
Appointment apt;
try
{
if (!int.TryParse(elementID, out aptId))//The appoitnment is occurrence and FindByID expects a string
apt = RadScheduler1.Appointments.FindByID(elementID);
else //The appointment is not occurrence and FindByID expects an int
apt = RadScheduler1.Appointments.FindByID(aptId);
EventDetails toolTip = (EventDetails)LoadControl("EventDetails.ascx");
toolTip.TargetAppointment = apt;
panel.ContentTemplateContainer.Controls.Add(toolTip);
}
catch (Exception ex)
{
objbbCommon.WriteError(ex.Message.ToString());
}
}
Thanks in advance for your support.