Telerik

Forums

Skip Navigation LinksHome / Community / Forums / ASP.NET AJAX > ToolTip > Adding an appointment to tooltip manager

Not answered Adding an appointment to tooltip manager

Feed from this thread
  • David avatar

    Posted on Mar 2, 2009 (permalink)

    I don't understand why this isn't working......

     

     

     

    protected void RadScheduler1_AppointmentDataBound(object sender, SchedulerEventArgs e)

     

    {

     

        Appointment appt = e.Appointment;

     

     

        appt.ToolTip = appt.ID.ToString();

     

     

        RadToolTipManager1.TargetControls.Add(appt.ID.ToString());

     

    }

     

     

     


    I keep getting this:

    [NullReferenceException: Cannot find a server control with ID=2. If you need to specify a client-side element ID, please set IsClientID to true.]
       Telerik.Web.UI.RadToolTipBase.ThrowControlNotFound(String ctrlID) +61 blah blah blah blah blah

    I thought I'm supposed to feed RadToolTipManager1.TargetControls.Add the control's ID. I'm guessing that this is not the Appointment ID? How do I grab this?

    Sorry for two beginning ASP.NET questions today. This and the other small problem I posted about have me stuck, running in circles. Any assistance would be great.

    Reply

  • David avatar

    Posted on Mar 2, 2009 (permalink)

    Blew a few more hours tinkering with this and reading every single thing I could find on ToolTipManager.

    I could really use some help.

    A few more pieces of information:
    1. I cannot seem to be able to grab the clientID of RadSchedule appointments. (See below)
    2. The Appointment's ID field does not work with ToolTipManager's TargetControls method. (See below).

    Examples:

     

    protected

    void RadScheduler1_AppointmentDataBound(object sender, SchedulerEventArgs e)

     

    {

     

    e.Appointment.ToolTip = e.Appointment.ID.ToString();

     

     

    DataRowView row = (DataRowView)e.Appointment.DataItem;

     

     

    string subject = row["EODSubject"].ToString();

     

     

    string apptID = e.Appointment.ID.ToString();

     

     

    string clientID = e.Appointment.ClientID;

     

     

    lblDebug.Text += "xx - " + apptID + " - " + clientID + " - " + subject + " xx<br />";

     

     

    }

     

    The above code outputs this onto my page:

    xx - 2 - - MCCS TV Launch Edit xx
    xx - 3 - - TGIF xx
    xx - 3_0 - - TGIF xx
    xx - 3_1 - - TGIF xx
    xx - 3_2 - - TGIF xx
    xx - 3_3 - - TGIF xx
    xx - 3_4 - - TGIF xx
    xx - 4 - - Payday xx
    xx - 4_0 - - Payday xx
    xx - 4_1 - - Payday xx
    xx - 4_2 - - Payday xx
    xx - 6 - - TGIF xx
    xx - 7 - - New Activity xx
    xx - 9 - - Here is an event xx

    The clientID is not being grabbed. I have a feeling that that is the problem. HOW do I grab the ClientID? Can I please just have an answer and not a link to a guru sitting on top of a mountain? I really do not want to fight with this for another four hours.... Yes, I have already viewed all of your examples on using the ToolTipManager. It does not seem complicated at all. However, I am stuck and I just need guidance. Please assist.


    Reply

  • David avatar

    Posted on Mar 2, 2009 (permalink)

    Figured it out due to another thread. This code does the trick. Thanks Simon.

    protected

    void RadScheduler1_AppointmentCreated(object sender, AppointmentCreatedEventArgs e)

     

    {

     

    string clientID = e.Appointment.ClientID;

     

     

    RadToolTipManager1.TargetControls.Add(clientID, e.Appointment.ID.ToString(), true);

     

    }

    http://www.telerik.com/community/forums/aspnet-ajax/scheduler/radscheduler-with-radtooltipmanager-problem.aspx

    Reply

Back to Top

Skip Navigation LinksHome / Community / Forums / ASP.NET AJAX > ToolTip > Adding an appointment to tooltip manager
Related resources for "Adding an appointment to tooltip manager"

ASP.NET ToolTip Features   |  Documentation  |  DemosTelerik TV   |  Self-Paced Trainer  |  Step-by-step Tutorial  ]

Powered by Sitefinity ASP.NET CMS

Contact Us | Site Feedback | Terms of Use | Privacy Policy
Copyright © 2002-2010 Telerik. All rights reserved.