Rad tool tip for rad scheduler item is not working

2 posts, 0 answers
  1. Hemamalini
    Hemamalini avatar
    35 posts
    Member since:
    Jul 2010

    Posted 22 Jun 2011 Link to this post


        I have rad scheduler in my page. I have dynamically added  a 'more' link in appointments template with appointments id. i have set the target control id as more link id.
    protected void RadScheduler1_AppointmentCreated(object sender, AppointmentCreatedEventArgs e)
                   LinkButton lnkPermitName = (LinkButton)e.Container.FindControl("lblDisplayPermitName");
                   Label labelPermitName = (Label)e.Container.FindControl("labelPermitName");
                   if (!IsEditable)
                       lnkPermitName.Visible = false;
                       labelPermitName.Visible = true;
                       lnkPermitName.Visible = true;
                       labelPermitName.Visible = false;
                    LinkButton lnkButtonMore = new LinkButton();
                   lnkButtonMore.ID = e.Appointment.ID.ToString();
                   lnkButtonMore.Text = "More";
                  RadToolTipManager1.TargetControls.Add(lnkButtonMore.ClientID, e.Appointment.ID.ToString(), true);
                   //RadToolTipManager1.TargetControls.Add(lnkButtonMore.ID, e.Appointment.ID.ToString(), false);
                   if (e.Appointment.CssClass == UIConfigurationConstant.DARKBLUE)
                       lnkButtonMore.Style.Add(HtmlTextWriterStyle.Color, "white");
                   //LinkButton lnkButtonMore = new LinkButton();

    if i pass value while setting target control its not even firing.. if i remove value and pass only id, isClient id flag then its throwing
    System.ArgumentNullException: Value cannot be null.
    Parameter name: Cannot find a server control with ID=36822c37-d8ca-4b29-a31f-b315fb68a4a3. If you need to specify a client-side element ID, please set IsClientID to true.

    how to resolve this.. ?

  2. Marin Bratanov
    Marin Bratanov avatar
    3899 posts

    Posted 23 Jun 2011 Link to this post

    Hi Hemamalini,

    The new control you create needs to be added to its container in order for its lifecycle to begin. This means that before that its ClientID is not set correctly. Please adding it to the ToolTipManager's target controls collection after it has been added to the scheduler appointment:

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

    Best wishes,
    the Telerik team

    Browse the vast support resources we have to jump start your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.

Back to Top