This is a migrated thread and some comments may be shown as answers.

[Solved] ToolTip and RadScheduler

1 Answer 426 Views
Scheduler
This is a migrated thread and some comments may be shown as answers.
Steve Wages
Top achievements
Rank 1
Steve Wages asked on 26 Apr 2008, 05:18 PM
hi,
i'm trying to copy this demo:

http://www.telerik.com/DEMOS/ASPNET/Prometheus/Scheduler/Examples/RadToolTip/DefaultCS.aspx

how do you use this ToolTipManager and RadScheduler and AjaxManager together?

If in ajaxmanager i set the RadScheduler, to update the ToolTipManager
the page keeps update and refreshing.

If i don't set the RadScheduler to update to the tooltip, then when i click on the Scheduler to load new appointments, i'm not getting the tips for the new days.

The tips show up for the first time the calendar loads, but when i navigate to a new month view (for example), i'm not getting new tool tips.
here's some key Sub from the code behind.
I'm not sure if i'm firing the right events or configuring the ajaxmanager properly.
I think it has something to do with after the Scheduler is updated, i'm not getting
When i'm debugging, after moving to another month, the: RadToolTipManager1_AjaxUpdate
never gets fired.
It gets fired on first time in and looking at the scheduler, once i move to another month on the scheduler, it does not.


Thanks.


    Protected Sub RadScheduler1_AppointmentCreated(ByVal sender As Object, ByVal e As Telerik.Web.UI.AppointmentCreatedEventArgs) Handles RadScheduler1.AppointmentCreated 
        If (e.Appointment.Visible AndAlso Not IsAppointmentRegisteredForTooltip(e.Appointment)) Then 
            RadToolTipManager1.TargetControls.Add(e.Appointment.ClientID, True) 
        End If 
 
    End Sub 
    Private Function IsAppointmentRegisteredForTooltip(ByVal apt As Appointment) As Boolean 
        For Each targetControl As ToolTipTargetControl In RadToolTipManager1.TargetControls 
            If (targetControl.TargetControlID = apt.ClientID) Then 
                Return True 
            End If 
        Next 
        Return False 
    End Function 
 
    Protected Sub RadToolTipManager1_AjaxUpdate(ByVal sender As Object, ByVal e As ToolTipUpdateEventArgs) 
        Dim aptId As IntegerInteger = Integer.Parse(e.TargetControlID.Split("_")(3)) 
        Dim apt As Appointment = RadScheduler1.Appointments(aptId) 
        Dim toolTip As controls_AppointmentToolTip = CType(LoadControl("../controls/AppointmentToolTip.ascx"), controls_AppointmentToolTip) 
        toolTip.apt = apt 
        e.UpdatePanel.ContentTemplateContainer.Controls.Add(toolTip) 
 
    End Sub 
 
    Protected Sub RadAjaxManager1_AjaxRequest(ByVal sender As Object, ByVal e As Telerik.Web.UI.AjaxRequestEventArgs) Handles RadAjaxManager1.AjaxRequest 
        If e.Argument = "RebindScheduler" Then 
            RadScheduler1.Rebind() 
 
        End If 
    End Sub 

1 Answer, 1 is accepted

Sort by
0
Peter
Telerik team
answered on 28 Apr 2008, 01:14 PM
Hello Steve,

Can you reproduce the problem in the online example you refer to? I tested it and everything worked as expected. I am not sure why you experience problems, but I can send you an isolated working demo project if you think this might help you find the cause of the problem. Or, you can open a support ticket and send us a demo project of the issue, which we can debug locally.


Cheers,
Peter
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
Tags
Scheduler
Asked by
Steve Wages
Top achievements
Rank 1
Answers by
Peter
Telerik team
Share this question
or