Hello Michael Tissington,
Please have a look at the following code fragment that demonstrates one possible approach:
aspx:
<body> |
<script type="text/javascript"> |
function OpenToolTip() |
{ |
Sys.Application.add_load(ShowToolTip); |
} |
|
function ShowToolTip() |
{ |
var tooltip = $find('<%= RadToolTip1.ClientID %>'); |
tooltip.show(); |
Sys.Application.remove_load(ShowToolTip); |
} |
</script> |
<form id="form1" runat="server"> |
<asp:ScriptManager ID="ScriptManager1" runat="server" /> |
<telerik:RadToolTip ID="RadToolTip1" runat="server" TargetControlID="Button1" |
RelativeTo="Element" ShowEvent="OnRightClick"> |
</telerik:RadToolTip> |
<asp:Button ID="Button1" runat="server" Text="ShowToolTip" OnClick="Button1_Click" /> |
</form> |
</body> |
code-behind:
protected void Button1_Click(object sender, EventArgs e) |
{ |
if (Button1.Text == "ShowToolTip") |
{ |
Page.RegisterStartupScript("openToolTip", "<script>OpenToolTip();</script>"); |
Button1.Text = "Second"; |
} |
} |
All the best,
Tsvetie
the Telerik team