Removing tooltips on grid (clientside)

10 posts, 0 answers
  1. Arthur Rogers
    Arthur Rogers avatar
    7 posts
    Member since:
    Apr 2009

    Posted 31 Aug 2009 Link to this post

    I'm binded the result of a wcf service call to a grid on the client side. All good. I'm also trying to put tooltips on various columns in the grid (also clientside). Putting the tooltips on isn't the problem. The problem starts when I go to page 2. The tooltip IDs for page 1 still exist and so the tooltip breaks. So question is how do you remove the tooltips from the tooltipmanager on the clientside. I've seen the way to so this on the server side i.e. RadToolTipManager1.TargetControls.Clear(); But there doesn't seem to be an equivalent on the client side.
    Any help would be appreciated.
    Thanks
  2. HHalim
    HHalim avatar
    69 posts
    Member since:
    Aug 2005

    Posted 02 Sep 2009 Link to this post

    I have the same scenario as you, so I opened up a support ticket.

    The answer is that RadTooltipManager does not have a clientside clear() method. Telerik provided several workarounds to clear up the old tooltips artifacts, but it's certainly desirable to have a built-in clientside clear().

    So, now we have 2 votes from you and I for Telerik to make clientside clear() method.

  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Rumen
    Admin
    Rumen avatar
    12848 posts

    Posted 03 Sep 2009 Link to this post

    Hi guys,

    Thank you for your feature request. We logged it in our ToDo list for future consideration.

    Arthur, please try the suggestions below, test the demo page attached here and let us know if you need further assistance:

    1. Use a separate RadToolTip and a standard asp Update Panel to get the same functionality as the OnAjaxUpdate loading the tooltip manager offers. If you want to achieve the WebService functionality, you can use our RadXmlHttpPanel control which supports it and set teh desired content to the tooltip. The demos of the controls are available below:

      http://demos.telerik.com/aspnet-ajax/xmlhttppanel/examples/default/defaultcs.aspx
    2. We can also provide you with sample code which disposes the tooltips but we recommend to use the suggestion above instead. However, I prepared for you a simple demo page which shows how to dispose all the tooltips that have been created by the tooltip manager (as far as I understood you want to dispose all of them at once, when changing records, if I am not correct - please use this code as a start point to adjust it to work as you require).

    Best regards,
    Rumen
    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.
  5. Richard
    Richard avatar
    5 posts
    Member since:
    Jun 2009

    Posted 08 Oct 2009 Link to this post

    Was wondering if I could also get the code
    to clear the tooltips on the client side(didn't see it attached to this post)? Thanks!
  6. Tsvetie
    Admin
    Tsvetie avatar
    1517 posts

    Posted 09 Oct 2009 Link to this post

    Hello Richard,
    In order to download the demo page, you have to click here.

    Kind regards,
    Tsvetie
    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.
  7. Ari Perlstein
    Ari Perlstein avatar
    6 posts
    Member since:
    Nov 2009

    Posted 02 Feb 2010 Link to this post

    Hi, I have a similar problem, but I want a function to dispose tooltips just for a certain element.  I see the example you posted to dispose all tooltips on the page, and that is somewhat helpful, but I do not want to clear all tooltips.  In essence, I am trying to do the below.

    function ShowTooltip(element, text) { 
                    var tooltipManager = $find("<%= ttpManager.ClientID %>"); 
                    if (!tooltipManager) return;  
                    tooltip = tooltipManager.createToolTip(element);  
                    tooltip.set_text("<div style='padding: 3px;'>" + text + "</div>");  
                    element.onmouseover = null;  
                    tooltip.show();  
                } 
                function DisposeTooltip(element) { 
                    var tooltipManager = $find("<%= ttpManager.ClientID %>"); 
                    if (!tooltipManager) return;  
                    var tooltip = tooltipManager.getToolTipByElement(element);  
                    if (!tooltip) return;  
                    tooltip.hide(); 
                    tooltip.dispose(); 
                    tooltip = null
                    element.onmouseover = null
                } 

  8. Paul Reisinger
    Paul Reisinger avatar
    3 posts
    Member since:
    Apr 2006

    Posted 04 Feb 2010 Link to this post

    I would be interested in removing select tooltips as well.
  9. Svetlina Anati
    Admin
    Svetlina Anati avatar
    2795 posts

    Posted 05 Feb 2010 Link to this post

    Hello guys,

    Ari, I examined your code and it seems to be correct. Would you please explain what are the problems you experience with it?

    Paul, the direction Ari took is correct, in case he experiences problems we will examine them and you will be able to use this solution.


    Greetings,
    Svetlina
    the Telerik team

    Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
    Follow the status of features or bugs in PITS and vote for them to affect their priority.
  10. Ari Perlstein
    Ari Perlstein avatar
    6 posts
    Member since:
    Nov 2009

    Posted 05 Feb 2010 Link to this post

    Unfortunately the problem is intermittent.  Sometimes it will clear the tooltip, but the vast majority of times it will not remove it, and onmouseover it will popup.  Every browser seems to respond similarly.  Have you seen the same in your testing?  
  11. Svetlina Anati
    Admin
    Svetlina Anati avatar
    2795 posts

    Posted 10 Feb 2010 Link to this post

    Hello Ari,

    Would you please share fully runnable source code? As far as I can see from your code it is expected that a tooltip should show on mouse over because of the following line:

    tooltip = tooltipManager.createToolTip(element);

    There is no condition and thus it will create a new tooltip every time. This means that it is possible that the previous tooltip was disposed and the tooltip which is shown is a newly created one. However, this depends a lot on your logic and where you call this function - that is why I will need to examine a fully runnable page. Provide also explanations of the exact desired and actual result and the differences between them and I will do my best to help.


    All the best,
    Svetlina
    the Telerik team

    Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
    Follow the status of features or bugs in PITS and vote for them to affect their priority.
Back to Top
UI for ASP.NET Ajax is Ready for VS 2017