Hi Telerik Team,
I have some clarification with respect to the behavior of RAD Tooltip. Is there a posibility that tooltip can open only if some conditions are true? Let me brief out my problem and what I am looking at.
ASPX: I have created a tooltip manager as shown below.
<telerik:RadToolTipManager ID="radToolTipManager" runat="server" Width="600" Height="50" |
EnableEmbeddedBaseStylesheet="false" EnableEmbeddedSkins="false" Skin="PortfolioPopup" |
OffsetY="-7" OffsetX="0" RelativeTo="Element" Position="BottomRight" HideEvent="ManualClose" |
ShowEvent="OnClick" ManualClose="True" OnAjaxUpdate="radToolTipManager_AjaxUpdate"> |
</telerik:RadToolTipManager> |
code-bedind: In Page_Load Event, I am adding this code.
protected void Page_Load(object sender, EventArgs e) { if(!page.IsPostback) |
radToolTipManager.TargetControls.Add(hypConfirm.ClientID, true); |
} |
I have created tooltip manager since I am adding this to many other controls on my page. "hypConfirm" is a hyperlink which has added in aspx.
When user clicks on "Confirm", my AJAX method "radToolTipManager_AjaxUpdate" gets called. I am doing some database operations on this method in server side. Only if my database insert/update is successful, I would need to show the popup. I have shared my code below.
protected void radToolTipManager_AjaxUpdate(object sender, ToolTipUpdateEventArgs e) |
{ |
bool updateSuccess = InsertToDatabase("A"); |
if (updateSuccess) |
{ |
Control ctrToolTip = Page.LoadControl("Tooltip.ascx"); |
(ctrToolTip as ToolTipMessage).Title = "Status"; |
(ctrToolTip as ToolTipMessage).Message = "Database insertion is confirmed." |
e.UpdatePanel.ContentTemplateContainer.Controls.Add(ctrToolTip); |
} |
} |
Problem what I am facing is as soon as I clickthe Confirm button, tooltip gets displayed with 'X' button and loading happens. After the above code executed, tooltip shows up. If the above method fails, then it just shows the tooltip with 'X' button it. I am just using this tooltip to show it as Confirmation message. If my database operation is successful, then I need to show the pop-up with the confirmation message.