This is a migrated thread and some comments may be shown as answers.

Client-side caching using RadTooltipManager Client API

6 Answers 109 Views
ToolTip
This is a migrated thread and some comments may be shown as answers.
Greg Mercer
Top achievements
Rank 1
Greg Mercer asked on 18 Feb 2010, 01:49 AM
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

6 Answers, 1 is accepted

Sort by
0
Svetlina Anati
Telerik team
answered on 23 Feb 2010, 12:12 PM
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.
0
Amjad
Top achievements
Rank 1
answered on 12 Mar 2013, 10:16 AM
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
0
Marin Bratanov
Telerik team
answered on 12 Mar 2013, 11:20 AM
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.
0
Amjad
Top achievements
Rank 1
answered on 12 Mar 2013, 01:18 PM
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?
0
Marin Bratanov
Telerik team
answered on 14 Mar 2013, 11:35 AM
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.
0
Samer
Top achievements
Rank 1
answered on 21 Mar 2013, 08:54 AM
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
Tags
ToolTip
Asked by
Greg Mercer
Top achievements
Rank 1
Answers by
Svetlina Anati
Telerik team
Amjad
Top achievements
Rank 1
Marin Bratanov
Telerik team
Samer
Top achievements
Rank 1
Share this question
or