2 posts, 0 answers
  1. mww
    mww avatar
    257 posts
    Member since:
    Sep 2012

    Posted 21 Jun 2010 Link to this post

    Im starting to use the tooltip for the first time and have placed a tooltipmanager on my form.  Ive got the whole thing to work ok, its just that sometimes, when the tooltip initially appears, it displays in the far left of the page,then jumps over to the control that activated it.  How can I give the popup a consistent position ?

    this is the code

    <telerik:RadToolTipManager ID="RadToolTipManager1" runat="server" 
            AutoTooltipify="True" Skin="Sunset" OnAjaxUpdate="OnAjaxUpdate" Animation="Fade" RelativeTo="Mouse" HideEvent="LeaveToolTip">

    in my c# I have several images that activate different popups

     this.RadToolTipManager1.TargetControls.Add(this.ImageGuarantee.ClientID, "Guarantee", true);
                    this.RadToolTipManager1.TargetControls.Add(this.ImageWhy.ClientID, "Why", true);
                    this.RadToolTipManager1.TargetControls.Add(this.ImageVIP.ClientID, "VIP", true);

    protected void OnAjaxUpdate(object sender, ToolTipUpdateEventArgs args)
                this.UpdateToolTip(args.Value, args.UpdatePanel);
            private void UpdateToolTip(string elementID, UpdatePanel panel)
                Control ctrl = Page.LoadControl("~/UserControls/PopupNarrative.ascx");
                UserControls.PopupNarrative pn = (UserControls.PopupNarrative)ctrl;
                pn.PopupNarrativeType = elementID;

    Ive tried setting it to relative to element, but it makes no difference

  2. Svetlina Anati
    Svetlina Anati avatar
    2795 posts

    Posted 23 Jun 2010 Link to this post

    Hi mww,

    It is possible to get undesired position when there is not explicit width set and the OnAjaxUpdate event is used. However, this is expected behavior in such case - the content of the tooltip is loaded through AJAX and the tooltip cannot "predict" the width it has to have when it is shown. Thus it shows at some coordinates and after that the resize takes place and as a result the position is not the correct.

    This being said, you should set the Width property explicitly and to use the ContentScrolling property to the desired value in order to determine the behavior when the width should be bigger than the set. If you want the tooltip to resize accordingly you should set it to Default.

    We are currently working on improving this behavior but for the time being some explicit size set is the best solution for the case.

    Sincerely yours,
    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
Back to Top