More than 1 ShowEvent

3 posts, 0 answers
  1. Susan
    Susan avatar
    137 posts
    Member since:
    Jul 2007

    Posted 21 May 2008 Link to this post

    Is it possible to have more than one ShowEvent, such as OnClick and OnMouseOver for a single tooltip?

  2. Princy
    Princy avatar
    17421 posts
    Member since:
    Mar 2007

    Posted 22 May 2008 Link to this post


    Go through the following link.
    Show on Event

  3. Svetlina Anati
    Svetlina Anati avatar
    2795 posts

    Posted 22 May 2008 Link to this post

    Hello Susan,

    You are correct that it is not possible to specify two ShowEvent options.

    By examining your scenario, we believe we were able to come with a workaround that will do the trick in your case - essentially, you need to attach to the onclick event of the target control and cancel the event. Thus - the event will not propagate to the document and cause the "hide tooltip" functionality to execute.

    Would you please test whether this code meets your requirements?

    function cancelEvent(e) 
        if (!e) e = window.event; 
        if (!e) return false;  
        e.cancelBubble = true
        e.returnValue = false
        if (e.preventDefault)e.preventDefault(); 
        if (e.stopPropagation)e.stopPropagation();  
        return false; 
    <asp:HyperLink ID="HyperLink1" NavigateUrl="#" onclick="return cancelEvent(event);" runat="server">HyperLink</asp:HyperLink> 
    <telerik:RadToolTip ID="RadToolTip1" runat="server" TargetControlID="HyperLink1" AutoCloseDelay="4000" HideDelay="4000" >Test content</telerik:RadToolTip>

    Another option is to use two different RadToolTips with different ShowEvent specified in order to simulate the desired behavior.

    All the best,
    the Telerik team

    Instantly find answers to your questions at the new Telerik Support Center
Back to Top