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

RadToolTip in Scheduler

3 Answers 292 Views
Scheduler
This is a migrated thread and some comments may be shown as answers.
Cedric
Top achievements
Rank 1
Cedric asked on 26 Oct 2007, 05:23 PM
Hello,

I found in the demo section that it is possible to have a radtooltip on an appointment. I'm pretty sure that there are things missing in the presented code. Could we have a sample project demonstrating the radtooltip on an appointment that I could use?

Thank you again for your great work.

3 Answers, 1 is accepted

Sort by
0
Tim Barton
Top achievements
Rank 2
answered on 26 Oct 2007, 09:26 PM
Hi,

Take a look here.

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


Be advised that they are a few bugs with the example that I have opened up a support ticket.

----------------
1) Double Click on an event and click more to go to the advanced edit form
2) Click or put your mouse over the the calendar icon to get the error.

---------------

Delete both of the events by clicking the x icon.  Then try to add another event by double click RadScheduler, you will get an error

Tim
0
EmpowerIT
Top achievements
Rank 2
answered on 28 Oct 2007, 11:27 PM
Here is some code that I used in an old project to implement a RadToolTip in conjuction with the RadScheduler (n.b. these were early days of me using telerik controls, so be wary of ugly code below :p)

 void DesignerSchedule_Init(object sender, EventArgs e) 
    { 
        RadToolTipManager1.AjaxUpdate += new ToolTipUpdateEventHandler(RadToolTipManager1_AjaxUpdate); 
    } 
    void RadToolTipManager1_AjaxUpdate(object sender, ToolTipUpdateEventArgs e) 
    { 
        try 
        { 
            char[] splitters = { '_' }; 
            string[] foo = (e.TargetControlID.Split(splitters)); 
            int aptIndex = Convert.ToInt32(foo[1]); 
            Appointment apt = RadScheduler1.Appointments[aptIndex]; 
            Shared_AppointmentToolTip tootip = LoadControl("../Shared/AppointmentToolTip.ascx"as Shared_AppointmentToolTip; 
            tootip.TargetAppointment = apt; 
            e.UpdatePanel.ContentTemplateContainer.Controls.Add(tootip); 
        } 
        catch 
        { 
        } 
    } 
I had to split the TargetControlID because i believe it also contained the ID of the RadScheduler. It was in the form RadShedulerID_ApptIndex_somethingelse.
There is probably a much more elegant way to do this, but if it aint broke, dont fix it ;)


In the aspx page, this was all I inserted
 <telerik:RadToolTipManager runat="server" ID="RadToolTipManager1" 
   Width="300" Height="100" Skin="Vista" Animation="Resize" Position="BottomRight" 
   Sticky="false" Text="Loading..." AutoCloseDelay="6000"/> 

Don't forget to include all the references are register commands at the top  of your aspx file
0
Cedric
Top achievements
Rank 1
answered on 29 Oct 2007, 12:53 PM
Tim, link64,

Thank you for your help! I am surely gonna be able to do something with these sample codes.

Have a nice day!
Tags
Scheduler
Asked by
Cedric
Top achievements
Rank 1
Answers by
Tim Barton
Top achievements
Rank 2
EmpowerIT
Top achievements
Rank 2
Cedric
Top achievements
Rank 1
Share this question
or