This is a migrated thread and some comments may be shown as answers.

In Ajax button click stop working after using tooltop onclick

1 Answer 61 Views
This is a migrated thread and some comments may be shown as answers.
Top achievements
Rank 1
R asked on 18 Aug 2010, 11:52 AM
After I implemented code for tooltip click show the ajax my code for ajax button click is stop woring please see the code below


///aspx code
 <asp:UpdatePanel ID="UpdatePanel1" runat="server" UpdateMode="Always">
            <asp:DataList ID="thumbRotatoralt" runat="server" OnItemDataBound="ParentList" OnItemCommand="AddToBasket_ItemCommand" EnableViewState="true">
<asp:Button ID="btnCart" runat="server" CssClass="pbuttonssmal" Text="Add to Basket"
                                        CommandName="AddItemToBasket" onfocus="Hilite(this)" onblur="Hilite(this, false)" />
    <telerik:RadToolTip ID="RadToolTip2" runat="server" Width="100px" ShowEvent="OnClick"
        TargetControlID="link2" IsClientID="true" HideEvent="LeaveToolTip" Position="Center" EnableShadow="true"
        Animation="Resize" ShowDelay="0" RelativeTo="Element" Text="Right-click on the picture above to show the RadToolTip." />
        <telerik:RadToolTipManager runat="server" ID="RadToolManager1" EnableShadow="true"
<script type="text/javascript">
    var lastActiveToolTip = null;
    function OnClientShow(sender, args) {
        lastActiveToolTip = sender;
   function beforeunload() {
        var activeTooltip = Telerik.Web.UI.RadToolTip.getCurrent();
        if (!activeTooltip) activeTooltip = lastActiveToolTip;
        if (activeTooltip) {
            var targetElement = activeTooltip.get_targetControl();
            activeTooltip._registerMouseHandlers(targetElement, false);
    if (Sys.Browser.agent == Sys.Browser.InternetExplorer) {
        window.attachEvent('onbeforeunload', beforeunload);

///my code behind
protected void AddToBasket_ItemCommand(Object sender, DataListCommandEventArgs e)
        //my click event code to save changes to database
    protected void ParentList(object sender, DataListItemEventArgs e)
        DataListItem item = e.Item;
        if ((item.ItemType == ListItemType.Item) ||
            (item.ItemType == ListItemType.AlternatingItem))
        Button btnCart = (Button)item.FindControl("btnCart");
        btnCart.ToolTip = "Item(s) added to basket";
        RadToolManager1.TargetControls.Add(btnCart.ClientID, true);

1 Answer, 1 is accepted

Sort by
Svetlina Anati
Telerik team
answered on 20 Aug 2010, 01:23 PM
Hello R,

 I already answered your support threads and provided modified demos there and I suggest to continue our communication there.

the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
Asked by
Top achievements
Rank 1
Answers by
Svetlina Anati
Telerik team
Share this question