ToolTipManager: Changing TargetControl on the client

5 posts, 0 answers
  1. Guido S
    Guido S avatar
    16 posts
    Member since:
    Aug 2009

    Posted 16 Mar 2012 Link to this post

    Hello,

    I have a problem adding a TargetControl to my radToolTipManager on the client side. We are currently doing this in the code behind where it works like this.

    tooltipManager.TargetControls.Add(ibAddToSelection.ClientID, value, true);

    But now id like to do this on the clientside.

    PS: This is not the same problem as the pinned "Changing TargetControl on the client". Since i also need to set the value.
  2. Guido S
    Guido S avatar
    16 posts
    Member since:
    Aug 2009

    Posted 16 Mar 2012 Link to this post

    We did also try the creatToolTip(ITEM);  but that did not work either. It gave an error that it did not support the getAttribute("") method. From somewhere inside a telerik script.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Guido S
    Guido S avatar
    16 posts
    Member since:
    Aug 2009

    Posted 19 Mar 2012 Link to this post

    Please help us since we are still trying to solve this problem. We really need to use the tooltipmanager since we are using a template control which is set in the onAjaxUpdate.

  5. Marin Bratanov
    Admin
    Marin Bratanov avatar
    3595 posts

    Posted 19 Mar 2012 Link to this post

    Hello Guido,

    Are you using this online demo as base for using the Client-side API of the RadToolTipManager: http://demos.telerik.com/aspnet-ajax/tooltip/examples/radtooltipmanagerclientapi/defaultcs.aspx? If so - have you removed the two lines where the src of the target is extracted for the purpose of the demo:
    if (!tooltip)
                {
                    tooltip = tooltipManager.createToolTip(element);
      
      
                    //var src = element.getAttribute("src", 2);
                    //var country = src.substring(src.lastIndexOf("/") + 1, src.lastIndexOf("."));
      
                    //get the value here depending on your own scenario
                    tooltip.set_value(myValue); 
                }

    Also, can you confirm that your ITEM variable is an actual element reference and not a, for example, ID of an element? Please also check if your target elements have their ID properties set. They shouldn't always be necessary when using this approach, yet I suggest you test with this as well.

    Regards,
    Marin
    the Telerik team
    If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
  6. Guido S
    Guido S avatar
    16 posts
    Member since:
    Aug 2009

    Posted 21 Mar 2012 Link to this post

    Hello Marin,

    Thank you.

    Maybe our ITEM was where we went wrong.
    I'm not sure this is the solution, but we did fix a work-around yesterday. (it took us too many hours)
    We might end up getting back at this later.
    I will post my findings here if we do.

    Thanks for your help.
Back to Top
UI for ASP.NET Ajax is Ready for VS 2017