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

RadTooltipManager OnAjaxUpdate will not fire when other page controls are Ajaxified

1 Answer 76 Views
ToolTip
This is a migrated thread and some comments may be shown as answers.
Jim Burns
Top achievements
Rank 1
Jim Burns asked on 29 Jul 2010, 12:31 AM
Hi

I have a page on which I have added dynamic tooltips using RadToolManager and they work well, popping up from the rows of a RadGrid.

When I add any other component to the RadAjaxManager, however, the tooltips stop working and it seems that the OnAjaxUpdate event is not fired.

It is difficult for me to provide source code examples as the system contains proprietary concepts but I can provide more information if needed. I've added some small samples here and hopefully these will help.

Thanks!

Jim

Heres where I add the tooltip:

    protected void grdExistingStock_ItemDataBound(object sender, Telerik.Web.UI.GridItemEventArgs e)
    {
        if (e.Item.ItemType == GridItemType.Item || e.Item.ItemType == GridItemType.AlternatingItem)
        {
            Control target = e.Item.FindControl("targetControl");
            if (!Object.Equals(target, null))
            {
                if (!Object.Equals(this.RadToolTipManager1, null))
                {
                    //Add the button (target) id to the tooltip manager
                    this.RadToolTipManager1.TargetControls.Add(target.ClientID, (e.Item as GridDataItem).GetDataKeyValue("STKCODE").ToString(), true);
                    this.RadToolTipManager1.BorderStyle = BorderStyle.Solid;
                    this.RadToolTipManager1.BorderWidth = 1;
                }
            }
        }
    }

and updating the tooltip:

    protected void OnAjaxUpdate(object sender, Telerik.Web.UI.ToolTipUpdateEventArgs args)
    {
        this.UpdateToolTip(args.Value, args.UpdatePanel);
    }

    private void UpdateToolTip(string elementID, UpdatePanel panel)
    {
        panel.UpdateMode = UpdatePanelUpdateMode.Conditional;

        Control ctrl = Page.LoadControl("~/StockSpecificationControl.ascx");
        StockSpecificationControl stockControl = (StockSpecificationControl)ctrl;

        stockControl.ShowInfoHeader = true;
        stockControl.StockCode = elementID;
        stockControl.SetUpUi();
        stockControl.DataBind();
        panel.ContentTemplateContainer.Controls.Add(ctrl);
    }

1 Answer, 1 is accepted

Sort by
0
Jim Burns
Top achievements
Rank 1
answered on 29 Jul 2010, 01:09 AM
I solved this problem.

I removed the reference to RadAjaxManager from the aspx file.

Dropped a RadAjaxPanel onto the page and then dropped my RadGrid onto that.

Added the RadAjaxLoadingPanel using the smart tag of the RadAjaxPanel.

All working well now.

But I wonder what was wrong and would appreciate an explanation from someone who knows how all this fancy stuff works :-P
Tags
ToolTip
Asked by
Jim Burns
Top achievements
Rank 1
Answers by
Jim Burns
Top achievements
Rank 1
Share this question
or