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

Help with ToolTipManager

3 Answers 36 Views
ToolTip
This is a migrated thread and some comments may be shown as answers.
Matt
Top achievements
Rank 1
Matt asked on 15 Mar 2012, 04:25 PM
I have spent the last few hours reading docs, threads and demos about the RadToolTipManager. I just don't get it. Here is what I want to do:

I have a ton of controls I need tool tips for. Right now the page has a separate RadToolTip for each control. I don't want this. But I can't figure out how to use the manager. How do I tell it what controls to use? These aren't dynamic controls, I know exactly what the list of controls is before the page runs so I don't need some wonky server code on some event running to fill the container at run-time. I can hard code them all in. So how do I do that exactly? Also, how do I tell it what tip text to give each control. Again, this is all static strings, I don't need to fetch text from a db and do ajax updates for every tool tip. How can I just hard code the tips in for each control?

3 Answers, 1 is accepted

Sort by
0
Marin Bratanov
Telerik team
answered on 16 Mar 2012, 04:47 PM
Hi Matt,

You can see how to popupate the TargetControls collection in this help article: http://www.telerik.com/help/aspnet-ajax/tooltipmanager-targetcontrols.html. You can do this either in the markup, or in the code-behind (e.g. in the PageLoad when the page is not posted back).

If you need static strings and you do not need dynamic updates there are two ways you can do this:
1) add the desired string to the Value property of the target control item, then in the OnClientShow event set this value as the text, e.g.:
function OnClientShow(sender, args){
    sender.set_text(sender.get_value());
}


OR

2) set the strings you need in your controls' tooltip or alt property (i.e. as default browser tooltips) and turn on the Autotooltipify feature of the RadToolTipManager which will automatically replace them with RadToolTips. You can see it in action in this online demo.

 Note that you must not have an OnAjaxUpdate event handler attached for both approaches to work so simply, as the main purpose of the ToolTipManager is to load content on demand.

All the best,
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
Matt
Top achievements
Rank 1
answered on 19 Mar 2012, 05:14 PM
I can't get these approaches to work. I guess I will just create around 25 rad tool tips on this single page to handle all the controls. ToolTipManager is clearly not what I thought it was.
0
Marin Bratanov
Telerik team
answered on 21 Mar 2012, 02:08 PM
Hello, Matt,

I am sorry to hear that things are not working out as you expect them to. I am attaching here two pages that demonstrate the basic concepts of my previous suggestions. Please examine them and see if this can fit in your scenario.


All the best,
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.
Tags
ToolTip
Asked by
Matt
Top achievements
Rank 1
Answers by
Marin Bratanov
Telerik team
Matt
Top achievements
Rank 1
Share this question
or