Help with ToolTipManager

4 posts, 0 answers
  1. Matt
    Matt avatar
    23 posts
    Member since:
    Mar 2011

    Posted 15 Mar 2012 Link to this post

    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?
  2. Marin Bratanov
    Admin
    Marin Bratanov avatar
    3602 posts

    Posted 16 Mar 2012 Link to this post

    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.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Matt
    Matt avatar
    23 posts
    Member since:
    Mar 2011

    Posted 19 Mar 2012 Link to this post

    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.
  5. Marin Bratanov
    Admin
    Marin Bratanov avatar
    3602 posts

    Posted 21 Mar 2012 Link to this post

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