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

Tooltip Web Service + Long appointements duration

2 Answers 39 Views
Scheduler
This is a migrated thread and some comments may be shown as answers.
Mike Taylor
Top achievements
Rank 1
Mike Taylor asked on 31 Dec 2009, 03:47 PM

Hello,

 

I’m encountering a problem with a scheduler populated on client side with a web service and Tooltips generated on client side (and loaded with a web service too) in WeekView mode.

 

The problem appears only for appointments with a different star date & end date day.

For example: 2009/12/26 10:00:00  -->  2009/12/27 14:00:00

In this particular case, as you can see on the screenshot I did, my custom tooltip is displayed correctly on the first part of the appointment corresponding to the first day, but not on the second part corresponding to the second day.

 

How can I solve this problem?

 

My code:

 

    <telerik:RadToolTipManager ID="RadToolTipManager" HideEvent="ManualClose" Animation="None" ShowEvent="OnRightClick" Width="120px"   
          RelativeTo="Mouse" Position="BottomRight" runat="server" > 
        <WebServiceSettings Path="SchedulerWebService.asmx" Method="GetAppointementDetailInfo" /> 
    </telerik:RadToolTipManager>  

 

 

Scheduler javascript event:

                 function onClientAppointmentCreated(sender, eventArgs) {  
                     /*eventArgs.get_domEvent().preventDefault();*/ // Prevent displaying the browser menu  
                     var element = eventArgs.get_appointment().get_element();  
                     var EntityID = eventArgs.get_appointment().get_attributes().getAttribute("EntityID");  
 
                     var tooltipManager = $find("<%= RadToolTipManager.ClientID %>");  
 
                     //If the user hovers the image before the page has loaded, there is no manager created  
                     if (!tooltipManager) return;  
 
                     //Find the tooltip for this element if it has been created  
                     var tooltip = tooltipManager.getToolTipByElement(element);  
 
                     //Create a tooltip if no tooltip exists for such element  
                     if (!tooltip) {  
                         tooltip = tooltipManager.createToolTip(element);  
                         tooltip.set_value(EntityID);  
                     }  
                 } 

 

 

Moreover, there is the same problem for appointment during more than a full day and displayed at the top of the scheduler in the ‘all day’ section.

Thank you for you help.

2 Answers, 1 is accepted

Sort by
0
T. Tsonev
Telerik team
answered on 05 Jan 2010, 09:13 AM
Hi Mike,

Thank you for providing detailed information about the issue. The get_element() method will return only the first DOM element for multi-part appointments. In order to get all elements you should use get_elements() which returns an array.

I've noticed that this method is not included in the API reference. We will correct this shortly.

Greetings,
Tsvetomir Tsonev
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
0
Mike Taylor
Top achievements
Rank 1
answered on 05 Jan 2010, 05:13 PM
Thank you for your answer which allowed me to find a solution to my problem until your next correction .
I explored the javascript code and found that this code works perfectly:

                 function onClientAppointmentCreated(sender, eventArgs) {  
                     /*eventArgs.get_domEvent().preventDefault();*/ // Prevent displaying the browser menu  
                     var appointment = eventArgs.get_appointment();  
                     var EntityID = eventArgs.get_appointment().get_attributes().getAttribute("EntityID");  
                     for (var i = 0; i < appointment._domElements.length; i++) {  
                         var element = appointment._domElements[i];                           
 
                         var tooltipManager = $find("<%= RadToolTipManager.ClientID %>");  
 
                         //If the user hovers the image before the page has loaded, there is no manager created     
                         if (!tooltipManager) return;  
 
                         //Find the tooltip for this element if it has been created     
                         var tooltip = tooltipManager.getToolTipByElement(element);  
 
                         //Create a tooltip if no tooltip exists for such element     
                         if (!tooltip) {  
                             tooltip = tooltipManager.createToolTip(element);  
                             tooltip.set_value(EntityID);  
                         }  
                     }  
                 }  
Tags
Scheduler
Asked by
Mike Taylor
Top achievements
Rank 1
Answers by
T. Tsonev
Telerik team
Mike Taylor
Top achievements
Rank 1
Share this question
or