RadTooltipManager OnAjaxUpdate will not fire when other page controls are Ajaxified

2 posts, 0 answers
  1. Jim Burns
    Jim Burns avatar
    3 posts
    Member since:
    Mar 2010

    Posted 28 Jul 2010 Link to this post

    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);
        }

  2. Jim Burns
    Jim Burns avatar
    3 posts
    Member since:
    Mar 2010

    Posted 28 Jul 2010 Link to this post

    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
  3. UI for ASP.NET Ajax is Ready for VS 2017
Back to Top