Client-side caching using RadTooltipManager Client API

7 posts, 0 answers
  1. Greg Mercer
    Greg Mercer avatar
    13 posts
    Member since:
    Jan 2010

    Posted 17 Feb 2010 Link to this post

    Hi,

    I've created a sample application very similar to the demo shown here:
    http://demos.telerik.com/aspnet-ajax/tooltip/examples/radtooltipmanagerclientapi/defaultcs.aspx

    The demo uses the RadTooltipManager Client API to make WebService calls to the server each time the tooltip is displayed.

    Is there any way to cache data on the client-side, so that if the tooltip has been brought up a previous time, the cached data would be loaded rather than making the WebService call again - and wasting bandwidth.

    Thanks for your help,
    Greg
  2. Svetlina Anati
    Admin
    Svetlina Anati avatar
    2795 posts

    Posted 23 Feb 2010 Link to this post

    Hello Greg,

    As far as I understand your requirements you want to make only one call to the WebService to get the content and not to perform further calls to it. If so, I would like to inform you that we are considering implementing a client event OnClientRequestStart which will be cancelable - in this case you can cancel subsequent calls if they are not needed.

    For the time being I prepared for you a workaround - please examine the attached demo. Note, that the workaround overrides an internal method and we do not recommend to have such code - if it is possible for you, please wait until the client event is available (this will be done most probably for the upcoming Q1 2010 release, scheduled for the beginning of March). If, however, you decide to use the workaround for the time being, make sure that you upgrade and remove it once this is possible.


    Kind regards,
    Svetlina
    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.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Amjad
    Amjad avatar
    36 posts
    Member since:
    Dec 2010

    Posted 12 Mar 2013 Link to this post

    Hello I have subject related question,

    I have a rad gird with images per row that shows a tooltip on click from code (like this example http://demos.telerik.com/aspnet-ajax/tooltip/examples/radtooltipmanagerclientapi/defaultcs.aspx).

    after multiple tooltips are closed, I need to know if there is a way to remove the resulted DIVs the are on the end of page ?
    cause am using scripts that calls controls with certain IDs and those DIVs have those controls with the same IDs which causes problems.

    please advise
  5. Marin Bratanov
    Admin
    Marin Bratanov avatar
    3602 posts

    Posted 12 Mar 2013 Link to this post

    Hi Amjad,

    DataCaching should only be enabled for static content, controls should not be used inside, nor should elements with IDs that will duplicate. This feature keeps the HTML that has once been received from the server and does not request it again. This means that the instance on the server may no longer match the on on the client. This is explained in the data caching demo's description.

    If you need the content to be disposed you should disable caching. This will make the RadToolTipManager move the UpdatePanel that loads the content in the DOM to be inside the currently shown tooltip and thus only one instance of the server content will reside on the page.


    Kind regards,
    Marin Bratanov
    the Telerik team
    If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
  6. Amjad
    Amjad avatar
    36 posts
    Member since:
    Dec 2010

    Posted 12 Mar 2013 Link to this post

    hello,

    I have looked into the provided demo and I attached a snapshot that clarifies what am talking about.

    the snapshot shows that am disabling data caching and still DIVs are created (not disposed).

    any ideas how to remove them?
  7. Marin Bratanov
    Admin
    Marin Bratanov avatar
    3602 posts

    Posted 14 Mar 2013 Link to this post

    Hi Amjad,

    These divs are the elements upon which the RadToolTip instances are created. This is done with JavaScript and we do not remove them on purpose, so that the next time the given tooltip must show it will be already available.

    Currently there isn't a way do destroy these objects manually as this is a task usually done by the framework on disposing the page. The idea of a similar method is already logged here.

    What you can do is to wipe the HTML the given tooltip has in its OnClientClose event, e.g. sender.get_contentElement().innerHTML = ""; where sender is the first argument the handler receives.


    Kind regards,
    Marin Bratanov
    the Telerik team
    If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
  8. Samer
    Samer avatar
    2 posts
    Member since:
    Jan 2008

    Posted 21 Mar 2013 Link to this post

    Hi,
    Since am using rad tooltip manager there isn't such a OnClientClose event but I used OnClientHide event which worked with me by removing the elements content (not the whole div though).

    I've been looking for this long time ago.

    thanks alot
Back to Top
UI for ASP.NET Ajax is Ready for VS 2017