MasterPage error with tooltip

4 posts, 0 answers
  1. Nyceane
    Nyceane avatar
    47 posts
    Member since:
    Nov 2007

    Posted 12 Dec 2007 Link to this post

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

    Under the demo, line
    Dim aptId As Integer = Integer.Parse(e.TargetControlID.Split("_")(1))
    would not pass when there is master page present, value for e.TargetControlID.Split("_")(1) would ring up "ContentPlaceHolder1", Is there anyway to fix it? such as loading strings some other way. Please help.
    Thank you
    Thank you
    Best Regards
    Peter

  2. Nyceane
    Nyceane avatar
    47 posts
    Member since:
    Nov 2007

    Posted 13 Dec 2007 Link to this post

    fixed..
  3. Jie
    Jie avatar
    3 posts
    Member since:
    Jun 2008

    Posted 11 Jun 2008 Link to this post

    Hi Peter,
    How did you end up fixing this error? I'm encountering the same problem, and I'm not sure how to get the actual appointment id without using the target control id. Thanks!
  4. Tsvetie
    Admin
    Tsvetie avatar
    1517 posts

    Posted 12 Jun 2008 Link to this post

    Hello Jie,
    After this example was created, we added new functionality to the RadToolTipManager, that would let you pass another parameter for each TargetControl instance. That is why, you need not use the TargetControlId to get the appointment id in the AjaxUpdate handler, you can just pass it as parameter to the Add method of the TargetControls collection:

    RadScheduler1_AppointmentCreated:
    RadToolTipManager1.TargetControls.Add(e.Appointment.ClientID, e.Appointment.ID.ToString(), true); 

    RadToolTipManager1_AjaxUpdate:
    protected void RadToolTipManager1_AjaxUpdate(object sender, ToolTipUpdateEventArgs e)  
    {  
    int aptId = int.Parse(e.Value);  
    Appointment apt = RadScheduler1.Appointments.FindByID(aptId);  
    ...  
     

    We will update the example to use this approach as well.

    Greetings,
    Tsvetie
    the Telerik team

    Instantly find answers to your questions at the new Telerik Support Center
Back to Top