RadToolTips populated via OnAjaxUpdate do not position correctly

7 posts, 0 answers
  1. Sime
    Sime avatar
    24 posts
    Member since:
    Jul 2007

    Posted 24 May 2009 Link to this post

    I have a series of <div>s on my page to which I apply RadToolTips (by adding their ID's to the RadToolTipManager's TargetControls collection). They are positioned as "TopCenter"

    All works fine - and has done for years, except, I cannot be sure of the height of the tooltips before the Ajax call since they will contain variable-length text data.<div>.

    I set the tooltip height to "50px" but obviously, after the callback, the height can be mcuh greater. This means the Tooltips covered the target <div>. to overcome this, I had to set OffsetY to a value large enough to ensure this doesn't happen. But this means that shorter tooltips appear way above the target <div>.

    My question: Is there a way to fix the position of variable height ToolTips so that they will always appear in the requested location relative to the target div? I feel that the Telrik control should do this automatically by calculating  the height of the ToolTip AFTER it has been populated but this doesn't seem to be the case!
  2. Sime
    Sime avatar
    24 posts
    Member since:
    Jul 2007

    Posted 26 May 2009 Link to this post

    Can anyone help? Or is my explanation unclear? :-)
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Svetlina Anati
    Admin
    Svetlina Anati avatar
    2795 posts

    Posted 27 May 2009 Link to this post

    Hi Sime,

    You can specify the position of a tooltip according to the Target Element by setting its Position property - you can learn more about it below:

    http://www.telerik.com/help/aspnet-ajax/tooltip_controllingposition.html

    Please, note that in order to apply the position according to the target element, you should set RelativeTo=Element, otherwise, the tooltip will show respecting the mouse. An online demo about the RelativeTo property is available below:

    http://demos.telerik.com/aspnet-ajax/tooltip/examples/relativeto/defaultcs.aspx


    Best wishes,
    Svetlina
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Check out the tips for optimizing your support resource searches.
  5. Sime
    Sime avatar
    24 posts
    Member since:
    Jul 2007

    Posted 04 Jun 2009 Link to this post

    Thanks for your reply Svetina, but it seems you didn't understood my post properly.

    am using:

    Position

     

    ="TopCenter" RelativeTo="Element"

    The problem I have is that the tooltip is not positioned correctly after the contents are filled using a call to my OnAjaxUpdate function. My previous post better explains this.

    Best R's
    Sime

  6. Svetlina Anati
    Admin
    Svetlina Anati avatar
    2795 posts

    Posted 09 Jun 2009 Link to this post

    Hi Sime,

    In this case, the only thing I can think of that might cause mispositioning of the tooltip is that you have not provided explicit size to the tooltips - the tooltip manager cannot predict what will be the size of the content before the first load. If so, please try setting some explicit width and height and also ContentScrolling="Default" - in this manner if the tooltip should get bigger, it should automatically resize itself to fit the content. Please test this and if it does not help, open a new support ticket and send us a sample, fully runnable reproduction demo along with detailed reproduction steps and explanations of the actual and the desired result and we will do our best to help.

    All the best,
    Svetlina
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Check out the tips for optimizing your support resource searches.
  7. Sime
    Sime avatar
    24 posts
    Member since:
    Jul 2007

    Posted 20 Oct 2009 Link to this post

    OK - it may be over a year later - but i never did resolve this! - and no developer ever has the time to isolate and extract a working "case" ;-)

    But, I have found that if I add an animation - e.g. Animation="Fade" or ANYTHING, other than "None", then the tooltip does resize and position itself correctly after the end of the animation. It seems that some sort of final positioning step is being missed if Animation="None" (which is the only option I can use if i don't want to annoy hell outa my users!).

    Is there a way I can emulate that last step - e.g. hook into an event or something?
  8. Svetlina Anati
    Admin
    Svetlina Anati avatar
    2795 posts

    Posted 23 Oct 2009 Link to this post

    Hello Sime,

    The difference between having an animation and not having such is that when you want to implement the animation, you should provide end bounds as well along with the other parameters. In ordre to get teh bounds of the tooltip, we actually show it for a very little time, get the bounds and then show it with the animation - this happens very fast and that is why you do not actually see it but in fact this a second show of the tooltip and not the very first one. If you want you can try the same logic - I prepared a test demo but unforunately I cannot reproduce the issue there and thus I cannot give you a working implementation of the above explained. If you can help me reproduce the problem, I could try to mimic the same logic in it. However, we  recommend to better set explicit size to the RadToolTipManager. Another solution is hook up the OnClientResponseEnd event and set the desired calculated size there.




    Kind regards,
    Svetlina
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Check out the tips for optimizing your support resource searches.
Back to Top
UI for ASP.NET Ajax is Ready for VS 2017