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

ToolTipManager: Changing TargetControl on the client

4 Answers 73 Views
ToolTip
This is a migrated thread and some comments may be shown as answers.
Guido S
Top achievements
Rank 1
Guido S asked on 16 Mar 2012, 01:45 PM
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.

4 Answers, 1 is accepted

Sort by
0
Guido S
Top achievements
Rank 1
answered on 16 Mar 2012, 02:45 PM
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.
0
Guido S
Top achievements
Rank 1
answered on 19 Mar 2012, 11:03 AM
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.

0
Marin Bratanov
Telerik team
answered on 19 Mar 2012, 05:30 PM
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.
0
Guido S
Top achievements
Rank 1
answered on 21 Mar 2012, 08:44 AM
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.
Tags
ToolTip
Asked by
Guido S
Top achievements
Rank 1
Answers by
Guido S
Top achievements
Rank 1
Marin Bratanov
Telerik team
Share this question
or