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

More than 1 ShowEvent

2 Answers 78 Views
ToolTip
This is a migrated thread and some comments may be shown as answers.
Susan
Top achievements
Rank 1
Susan asked on 21 May 2008, 04:20 PM
Is it possible to have more than one ShowEvent, such as OnClick and OnMouseOver for a single tooltip?

Thanks,
Susan

2 Answers, 1 is accepted

Sort by
0
Princy
Top achievements
Rank 2
answered on 22 May 2008, 11:56 AM
Hi,

Go through the following link.
Show on Event

Princy.
0
Svetlina Anati
Telerik team
answered on 22 May 2008, 01:28 PM
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?

<script> 
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; 
</script> 
 
<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,
Svetlina
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
Tags
ToolTip
Asked by
Susan
Top achievements
Rank 1
Answers by
Princy
Top achievements
Rank 2
Svetlina Anati
Telerik team
Share this question
or