RadToolTipManager Update target control

4 posts, 0 answers
  1. Duy
    Duy  avatar
    68 posts
    Member since:
    Apr 2009

    Posted 08 Oct 2009 Link to this post

    Hi,

    I have a problem on displaying the target control that retains the first selected information.

    Here my codes.

     

    protected void RadToolTipManager1_AjaxUpdate(object sender, Telerik.Web.UI.ToolTipUpdateEventArgs e)

     

    {

     

    Control ctrl = Page.LoadControl("~/UserControls/PersonalDetails.ascx");

     

    e.UpdatePanel.ContentTemplateContainer.Controls.Add(ctrl);

     

    PersonalDetails oPersonalDetails = (PersonalDetails)ctrl;

     

    oPersonalDetails.Initial(

    int.Parse(e.Value), 0, "", false);

     

    }

     

    protected void RGGP_ItemDataBound(object sender, Telerik.Web.UI.GridItemEventArgs e)

     

    {

    BaseClass.

    PeopleCareTeam oPeopleCareTeam = (BaseClass.PeopleCareTeam)e.Item.DataItem;

     

     

    if (e.Item.ItemType == Telerik.Web.UI.GridItemType.AlternatingItem || e.Item.ItemType == Telerik.Web.UI.GridItemType.Item)

     

    {

    RadToolTipManager1.TargetControls.Add(e.Item.ClientID, oPeopleCareTeam.LinkedPeopleID.ToString(),

    true);

     

    }

    }

    What shall I do to get refresh target control?

    Regards,

    Duy

  2. Svetlina Anati
    Admin
    Svetlina Anati avatar
    2795 posts

    Posted 12 Oct 2009 Link to this post

    Hi Duy ,

    I am afraid I could not completely understand when exactly and why you want to refresh the target control. Would you please provide more detailed explanations of the exact scenario you want to achieve? The code you have provided shows how you attach tooltips to target and how you put content in the tooltip but I could not understand where you try to update the targets.

    Once I have a better understanding on your exact goal, I will do my best to help!

    Kind regards,
    Svetlina
    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. Duy
    Duy  avatar
    68 posts
    Member since:
    Apr 2009

    Posted 12 Oct 2009 Link to this post

    Hi Svetlina,

     

    When the mouseover an item obviously I would like to update the content of the tool tip regarding to that item.  Currently, the tool tip content keeps retaining the first item.

    Regards,

    Duy

  5. Svetlina Anati
    Admin
    Svetlina Anati avatar
    2795 posts

    Posted 15 Oct 2009 Link to this post

    Hello Duy ,

    In  your previous post you said "What shall I do to get refresh target control?" and this made me unsure about your exact requirement - now you are explaining that you actually want to refresh the tooltip's content and not the target control itself.

    The provided code is not enough to fully understand the reason for the problem but I prepared for you a few assumptions:

    1) Make sure that you load the information in the user control every time when you load it - e.g if you have a databound control,, make sure that you call its DataBind() method everytime and not only on first load.

    2) In case you update the target thorugh AJAX make sure that you also update the RadToolTipManager at the same time - a sample demo is available below:

    http://demos.telerik.com/aspnet-ajax/tooltip/examples/targetcontrolsandajax/defaultcs.aspx
    You can test this assumption by disabling AJAX for teh test and see whether the issue disappears when a plain postback is used.

    If my assumptions do not help, I will really need to examine a sample, fully runnable reproduction demo. Please, prepare such (use Northwind or a fake programmatic datasource when needed) and upload it somewhere in the net - after that just provide a download url and reproduction instructions and I will examine and debug it locally and I will help you resolve the problem. Note, also that the demo you upload should not contain the Telerik.Web.UI.dll - just confirm the version you are actually using. Once I have a better understanding on your exact case, I will do my best to help.


    Regards,
    Svetlina
    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.
Back to Top