Hi
We have TooltipManager on master page. The page inheriting master page has image which is binded to Tooltipmanager on master page. I want to show/hide tooltip on button click event which does postback after click. After clicking button, TargetControls of ToolTipManager are added/cleared. This doesn't work when page is kept in UpdatePanel with UpdateMode=Conditional. The tooltip keeps on displaying on mouseover(should be removed when Hide button clicked).
The client side code for master page is:
The server side for master page is:
The page client side code is:
& the server side for the page is:
Please let me know if anyone knows or faced this issue earlier. Is there any other way to remove/show tooltip?
Warm Regards
Veenu
We have TooltipManager on master page. The page inheriting master page has image which is binded to Tooltipmanager on master page. I want to show/hide tooltip on button click event which does postback after click. After clicking button, TargetControls of ToolTipManager are added/cleared. This doesn't work when page is kept in UpdatePanel with UpdateMode=Conditional. The tooltip keeps on displaying on mouseover(should be removed when Hide button clicked).
The client side code for master page is:
<
telerik:RadScriptManager
ID
=
"RadScriptManager1"
runat
=
"server"
>
</
telerik:RadScriptManager
>
<
asp:ContentPlaceHolder
ID
=
"cpHolder"
runat
=
"server"
>
</
asp:ContentPlaceHolder
>
<
table
runat
=
"server"
>
<
tr
runat
=
"server"
>
<
td
colspan
=
"2"
id
=
"tdAddToolTip"
runat
=
"server"
>
<
telerik:RadToolTipManager
runat
=
"server"
ManualClose
=
"true"
Position
=
"Center"
ManualCloseButtonText
=
"Close"
ID
=
"rdToolTipManager"
Height
=
"200"
Width
=
"350"
RelativeTo
=
"Element"
OnAjaxUpdate
=
"OnAjaxUpdate"
ContentScrolling
=
"Default"
Skin
=
"Telerik"
/>
</
td
>
</
tr
>
</
table
>
protected void Page_Load(object sender, EventArgs e)
{
rdToolTipManager.TargetControls.Add("ctl00_cpHolder_img", true);
}
protected void OnAjaxUpdate(object sender, ToolTipUpdateEventArgs args)
{
Label tooltipLabel = new Label();
tooltipLabel.Text = "Hey it works!!!";
args.UpdatePanel.ContentTemplateContainer.Controls.Add(tooltipLabel);
}
<
asp:UpdatePanel
ID
=
"UpdatePanel1"
runat
=
"server"
UpdateMode
=
"Conditional"
>
<
ContentTemplate
>
<
asp:ImageButton
ImageUrl
=
"~/Images/btn_graph.gif"
ID
=
"img"
runat
=
"server"
/>
<
asp:Button
ID
=
"btnHide"
runat
=
"server"
OnClick
=
"btnHide_Click"
Text
=
"Hide"
/>
<
asp:Button
ID
=
"btnShow"
runat
=
"server"
OnClick
=
"btnShow_Click"
Text
=
"Show"
/>
</
ContentTemplate
>
<
Triggers
>
<
asp:AsyncPostBackTrigger
ControlID
=
"btnHide"
EventName
=
"Click"
></
asp:AsyncPostBackTrigger
>
<
asp:AsyncPostBackTrigger
ControlID
=
"btnShow"
EventName
=
"Click"
></
asp:AsyncPostBackTrigger
>
</
Triggers
>
</
asp:UpdatePanel
>
protected void Page_Load(object sender, EventArgs e)
{
}
protected void btnHide_Click(object sender, EventArgs e)
{
((Telerik.Web.UI.RadToolTipManager)(this.Page.Master.FindControl("rdToolTipManager"))).TargetControls.Clear();
}
protected void btnShow_Click(object sender, EventArgs e)
{
((Telerik.Web.UI.RadToolTipManager)(this.Page.Master.FindControl("rdToolTipManager"))).TargetControls.Add(img.ClientID, true); ;
}
Please let me know if anyone knows or faced this issue earlier. Is there any other way to remove/show tooltip?
Warm Regards
Veenu