Custom Tooltip for Appointments

5 posts, 1 answers
  1. NLV
    NLV avatar
    87 posts
    Member since:
    Aug 2009

    Posted 20 Jan 2010 Link to this post

    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
  2. Answer
    Peter
    Admin
    Peter avatar
    6637 posts

    Posted 20 Jan 2010 Link to this post

    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.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. NLV
    NLV avatar
    87 posts
    Member since:
    Aug 2009

    Posted 20 Jan 2010 Link to this post

    Hi,

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

    Thanks.
    NLV
  5. Peter
    Admin
    Peter avatar
    6637 posts

    Posted 20 Jan 2010 Link to this post

    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.
  6. InfySam
    InfySam avatar
    8 posts
    Member since:
    May 2012

    Posted 08 May 2012 Link to this post

    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
Back to Top
UI for ASP.NET Ajax is Ready for VS 2017