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

Rad tool tip for rad scheduler item is not working

1 Answer 82 Views
ToolTip
This is a migrated thread and some comments may be shown as answers.
Hemamalini
Top achievements
Rank 1
Hemamalini asked on 22 Jun 2011, 03:24 PM
Hi,

    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;
               }
               else
               {
                   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");
               e.Container.Controls.Add(lnkButtonMore);
               //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.. ?

thx

1 Answer, 1 is accepted

Sort by
0
Marin Bratanov
Telerik team
answered on 23 Jun 2011, 11:10 AM
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:

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



Best wishes,
Marin
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.

Tags
ToolTip
Asked by
Hemamalini
Top achievements
Rank 1
Answers by
Marin Bratanov
Telerik team
Share this question
or