ToolTip with dynamically loaded usercontrol

2 posts, 0 answers
  1. pustefisk
    pustefisk avatar
    1 posts
    Member since:
    Aug 2006

    Posted 04 May 2008 Link to this post

    I have an aspx page that dynamically load a usercontrol. On this usercontrol I have datalist that populate some items that have a ToolTip attached in the OnMouseOver event.

    When the onmouseover event fires in the usercontrol it postBack to the aspx page that in page_load event will add the usercontrol again. when adding the usercontrol the onmouseover event will get called again, and again ...

    The problem is, that since the cursor hasn't been moved since the first onmouseover event it gets repeated over and over.

    The question is how do i prevent this - can i somehow block the onmouseover event or is there a more proper solution ?

  2. Tervel
    Admin
    Tervel avatar
    1337 posts

    Posted 08 May 2008 Link to this post

    Hi pustefisk,

    If we understand correctly, showing of the tooltip somehow causes the page to post back. This is not the default tooltip's behavior, so in order for this to happen, you must have written some additional code that is not provided here.

    Secondly, if no AJAX is used in the whole scenario, then it is not possible to have the user control added over and over multiple times for each postback, because each postback starts the page lifecycle and the page control hyerarchy "from scratch" - thus it will only load the dynamically added control once for each page invocation, and this is not a cumulative action. So, it is possible that you use some kind of AJAX functionality (again no information provided about it)

    Since we are not sure what the problem is, and what the end result should be, my suggestion would be to open a support ticket and send us a sample project demonstrating what you have done, as well as explanations what you want to prevent from happenning.

    Best regards,
    Tervel
    the Telerik team

    Instantly find answers to your questions at the new Telerik Support Center
Back to Top