showdelay and load on demand

6 posts, 0 answers
  1. egbert heuvelman
    egbert heuvelman avatar
    7 posts
    Member since:
    Nov 2007

    Posted 30 Jul 2008 Link to this post

    hi,

    i followed the nice example from
    http://www.telerik.com/demos/aspnet/prometheus/ToolTip/Examples/RadToolTipManagerClientAPI/DefaultCS.aspx
    and all works like a charm.

    One little problem i have is the following: ShowDelay on the server for the radtooltipmanager is set to 3000, but it does not seem to work for the tooltip, it shows immediatly.

    Is this due the reason i have the tooltip.show() at the client in the mouseover?
    Or am i doing something wrong?

    Thanks in advance!
  2. Tsvetie
    Admin
    Tsvetie avatar
    1517 posts

    Posted 31 Jul 2008 Link to this post

    Hello Egbert,
    Yes, you are correct, the delay you set using the ShowDelay property of the RadToolTipManager is not applied, because you call the show method of the tooltip explicitly. In case you want to keep the current implementation, you can use window.setTimeout to execute the show method after a specified delay.

    Best wishes,
    Tsvetie
    the Telerik team

    Check out Telerik Trainer, the state of the art learning tool for Telerik products.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Michael Warden
    Michael Warden avatar
    19 posts
    Member since:
    Jan 2004

    Posted 25 Jan 2010 Link to this post

    i'm trying to use the setTimeout approach on the .Show() method, as below.  The delay is occuring and then the tooltip loads, but as soon as it finishes loading the attach error is thrown.

    function

     

    showToolTipCT(element, ftext) {

     

     

    var tooltipManager = $find("<%=RadToolTipManager1.ClientID%>");

     

     

    if (!tooltipManager) return;

     

     

    var tooltip = tooltipManager.getToolTipByElement(element);

     

     

    if (!tooltip) {

     

    tooltip = tooltipManager.createToolTip(element);

     

    var FinalText = ftext.replace("&apos;", "'")

     

    tooltip.set_manualClose(

    true);

     

    tooltip.set_text(FinalText);

    tooltip.set_width(400);

    tooltip.set_height(400);

    }

     

    window.setTimeout(

    "tooltip.show()",2000);

     

    }

  5. Svetlina Anati
    Admin
    Svetlina Anati avatar
    2795 posts

    Posted 26 Jan 2010 Link to this post

    Hello Michael Warden,

    The problem comes from the incorrect call to the setTimeout function - please, modify the code in the following manner and test again:

    window.setTimeout(
    function(){
      
    tooltip.show();}
      
    ,2000); 


    The problem comes from the fact that you should pass a function as an argument - this means either to define an anonymous one as shown above or declare another one and pass its name.


    Best wishes,
    Svetlina
    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.
  6. jc mag
    jc mag avatar
    106 posts
    Member since:
    Aug 2005

    Posted 13 Apr 2010 Link to this post

    There is a problem with the setTimeout method. If you hover the element, then move your mouse away, the tooltip will still appear after the seconds set in setTimeout...
    any workarount?
  7. Svetlina Anati
    Admin
    Svetlina Anati avatar
    2795 posts

    Posted 16 Apr 2010 Link to this post

    Hi jc mag,

    Since you show the tooltip from code and by using its method show(), you should also programmatically decide when it should hide or not show. If you simply need to show it on mouse over and hide it on mouse out you can use the built-in functionality - more about available hide events is available below:

    http://demos.telerik.com/aspnet-ajax/tooltip/examples/hideevent/defaultcs.aspx

    In the case of showing/hiding the tooltip programmatically from your code you should determine what is the behavior. To prevent the showing of the tooltip in some condition after its show was triggered and before it is displayed, you should handle teh OnClientBeforeShow event and use the args.set_cancel(true) syntax to cancel the show after you check the condition.

    Regards,
    Svetlina
    the Telerik team

    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
Back to Top
UI for ASP.NET Ajax is Ready for VS 2017