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

Custom Tooltip for Appointments

4 Answers 216 Views
Scheduler
This is a migrated thread and some comments may be shown as answers.
NLV
Top achievements
Rank 1
NLV asked on 20 Jan 2010, 01:04 PM
Hello team,

Sorry for my flurry of questions.

I'm binding a table having the columns A, B, C, D, E, F, G, H to the radscheduler and setting A, B, C, D as the DataKeyField, DataSubjectField, DataStartField, DataEndField.

My questions -

1. Now i want the tooltip to show the values from the columns E, F and G. How to do that?

2. What does Appointment.DataItem really return? Can i get the values of E, F and G from Appointment.DataItem? (I always get it as null)

Thank you once again.
NLV

4 Answers, 1 is accepted

Sort by
0
Accepted
Peter
Telerik team
answered on 20 Jan 2010, 01:15 PM
Hello Raghavendra,

1. The Using RadToolTip demo will help you with this task. You will have to use custom attributes to pass any additional information. In code behind of the AppointmentToolTip user control you can access the appointment object and get its custom attributes.

protected override void OnPreRender(EventArgs e)
       {
            base.OnPreRender(e);
           StartingOn.Text = apt.Owner.UtcToDisplay(apt.Start).ToString();
           FullText.Text = apt.Subject;
           AdditionalInfo.Text = apt.Attributes["H"];
       }

2. This question relates to the first one. You should use custom attributes. Set CustomAttributeNames="E,F,G,H" for RadScheduler and access the values as follows:
protected void RadScheduler1_AppointmentDataBound1(object sender, SchedulerEventArgs e)
   {
       //e.Appointment.Attributes["E"]
   }



Regards,
Peter
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
NLV
Top achievements
Rank 1
answered on 20 Jan 2010, 01:58 PM
Hi,

Can i've the C# code for the DefaultCS.aspx in the demo you gave?

Thanks.
NLV
0
Peter
Telerik team
answered on 20 Jan 2010, 03:12 PM
Hello Raghavendra,

You can find the code in your local installation of the Telerik.Web.UI controls >Live Demos\Scheduler\Examples\RadToolTip


Greetings,
Peter
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
InfySam
Top achievements
Rank 1
answered on 08 May 2012, 05:52 PM
Dear sir/mam,

I am trying to do similar thing as mentioned in demo "http://demos.telerik.com/aspnet-ajax/scheduler/examples/radtooltip/defaultcs.aspx". I have two problems and I need help in sorting them out.

1. I have a radScheduler, radtoolTipManager at hand. radScheduler has 'AppointmentCreated' event in which I want to add custom Tooltip. Just like in demo I have created an usercontrol for this tooltip. But when I am trying to load this usercontrol in 'AppointmentCreated' event it throws me an error "The directive 'page' is unknown". I would also like to tell you that the current controls radScheduler, radtoolTipManager too are in a .ascx

2. My second requirement is changing the radScheduler height and tooltip height dynamically using Jquery depending upon both of the following cases: 
    a.) the number of appointments(or events) and 
    b.) on the length of each appointment(or event). (The length of appointments differ from each other)

Note: I also tried another way, i.e; Loading Usercontrol from OnAjaxUpdate event of RadTooltipManager, but the event itself is not firing. FYI, In this process I added appointments to the RadTooltipManager in 'AppointmentCreated' event.

Any help in this regard is highly appreciated. Thanks in Advance
Tags
Scheduler
Asked by
NLV
Top achievements
Rank 1
Answers by
Peter
Telerik team
NLV
Top achievements
Rank 1
InfySam
Top achievements
Rank 1
Share this question
or