I've been able to track down my problem to a very specific scenario, one to which I hope there is an easy solution. I have a page with a single update panel (had to use the ASP.NET one due to conditional updating) which contains a "Show ToolTip" link only and a single ToolTip with an update panel and a close button. That simple. When I click on the link "Show ToolTip" the tooltip pops up just fine. When I click on the "Close ToolTip" button inside the tooltip it closes just fine. The close button fires a JavaScript method to close the tooltip and then updates the update panel contents. When I click on the "Show ToolTip" link again (A SECOND TIME), the screen goes modal (like it will load the tooltip) but shows no tooltip. I believe it is a problem with the target control id because if I set the target control id to blank and center the tooltip it comes up. This is not the behavior we want to exhibit in our application, though. Lastly, the target control must be variable because we have this tooltip popping up in a repeater.
The page code:
<
form
id
=
"form1"
runat
=
"server"
>
<
asp:scriptmanager
runat
=
"server"
></
asp:scriptmanager
>
<
telerik:RadToolTip
ID
=
"EditActivityModalToolTip"
ClientIDMode
=
"Static"
Modal
=
"true"
runat
=
"server"
IsClientID
=
"true"
Skin
=
"Telerik"
ShowEvent
=
"FromCode"
HideEvent
=
"FromCode"
EnableViewState
=
"True"
EnableShadow
=
"true"
Position
=
"MiddleRight"
OnClientBeforeHide
=
"EditActivityTooltipOnClientBeforeHide"
>
<
asp:UpdatePanel
ID
=
"ToolTipUpdatePanel"
runat
=
"server"
>
<
ContentTemplate
>
<
asp:Button
ID
=
"CloseButton"
OnClick
=
"CloseButton_CloseClicked"
runat
=
"server"
Text
=
"Button"
/>
</
ContentTemplate
>
</
asp:UpdatePanel
>
</
telerik:RadToolTip
>
<
div
>
<
asp:UpdatePanel
ID
=
"MainUpdatePanel"
runat
=
"server"
UpdateMode
=
"Conditional"
>
<
ContentTemplate
>
<
a
id
=
"SampleLink"
onclick
=
"javascript:ShowEditActivityToolTip('SampleLink', 'EditActivityModalToolTip')"
;>Show ToolTip</
a
>
</
ContentTemplate
>
</
asp:UpdatePanel
>
</
div
>
</
form
>
The JavaScript method(s):
<
script
type
=
"text/javascript"
>
var toHideEditActivityToolTip;
function EditActivityTooltipOnClientBeforeHide(sender, args) {
if (!toHideEditActivityToolTip) args.set_cancel(true);
}
function HideEditActivityToolTip(toolTipClientId) {
toHideEditActivityToolTip = true;
var radToolTip = $find(toolTipClientId);
radToolTip.hide();
}
function ShowEditActivityToolTip(sender, toolTipClientId) {
toHideEditActivityToolTip = false;
var radToolTip = $find(toolTipClientId);
radToolTip.set_targetControlID(sender);
radToolTip.show();
}
function OnClientBeforeShow(sender, args) {
sender._popupBehavior.set_keepInScreenBounds(false);
}
</
script
>
And lastly, the code behind for the close button:
protected void CloseButton_CloseClicked(object sender, EventArgs e)
{
ScriptManager.RegisterClientScriptBlock(Page, this.GetType(), "HideFilterToolTip", "HideEditActivityToolTip('" + EditActivityModalToolTip.ClientID + "');", true);
MainUpdatePanel.Update();
}
I also submitted this is a case due to the timeliness of needing an answer but I do sincerely appreciate and look forward to your remarks here. Regards!