Hi,
is it possible to load a usercontrol client-side to show as tooltip?
I have problems with using the manager.targetcontrols.add... it feels like random, sometimes the tooltip shows up sometimes it doesn't.
So I want to try load the tooltip client-side instead.
I checked out some examples with client-side code:
So far so good, the id is the correct one when I hoover.
Just for fun I tried to set the usercontrol in the managers webservicesettings but when running I get:
The server method 'GetToolTip' failed.
Can this work or do I have to use targetcontrols.add...?
Thanks!
/Mattias
is it possible to load a usercontrol client-side to show as tooltip?
I have problems with using the manager.targetcontrols.add... it feels like random, sometimes the tooltip shows up sometimes it doesn't.
So I want to try load the tooltip client-side instead.
I checked out some examples with client-side code:
| function showToolTip(element, id) { |
| var tooltipManager = $find("<%= radToolTipManager.ClientID %>"); |
| //If the user hovers the image before the page has loaded, there is no manager created |
| if (!tooltipManager) return; |
| //Find the tooltip for this element if it has been created |
| var tooltip = tooltipManager.getToolTipByElement(element); |
| //Create a tooltip if no tooltip exists for such element |
| if (!tooltip) { |
| tooltip = tooltipManager.createToolTip(element); |
| //Use the fact that the image was named after a country |
| //Extract the country name from the image, and set it as the value to be supplied to the web-service |
| //var src = element.getAttribute("src", 2); |
| //var country = src.substring (src.lastIndexOf("/") + 1, src.lastIndexOf(".")); |
| alert(id); |
| tooltip.set_value(id); |
| } |
| tooltip.show(); |
| } |
| <telerik:RadToolTipManager ID="radToolTipManager" runat="server" Position="BottomRight" Animation="None" AutoTooltipify="false" |
| Skin="Hay" EnableEmbeddedSkins="false" EnableEmbeddedBaseStylesheet="false" AutoCloseDelay="0" ShowDelay="100" CssClass="tooltip" |
| Width="300" Height="200" OffsetX="10" OffsetY="10"> |
| <WebServiceSettings Method="GetToolTip" Path="/usercontrols/Tooltip.ascx" /> |
| </telerik:RadToolTipManager> |
So far so good, the id is the correct one when I hoover.
Just for fun I tried to set the usercontrol in the managers webservicesettings but when running I get:
The server method 'GetToolTip' failed.
Can this work or do I have to use targetcontrols.add...?
Thanks!
/Mattias