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

problem with a load on demand tooltip

2 Answers 69 Views
ToolTip
This is a migrated thread and some comments may be shown as answers.
andieje
Top achievements
Rank 1
andieje asked on 19 Jun 2009, 11:44 PM
Hi

I have a radgrid that contains tooltips. These tooltips load content on demand. One of the controls inside the tooltip is a third party component which is a map object. The map generates an image which is rendered as a html image. Each tooltip should display a different map.

The first tooltip loads ok but all of the subsequent tooltips show the map from the first tooltip. I thought at first this was a caching issue and that the tooltips were loading the the image file belonging to the first tooltip. However i can see the images being generated in the directory on the hard drive and each tooltip is generating a separate image it's just for some bizarre reason all of the maps are displaying the same data

All of the information to generate the correct map is being passed back in the AjaxUpdate event. You can see this because if for example you look at tooltip1 then the map from tooltip1 is shown in all the other tooltips but if you look at tooltip2 first then map2 is shown in all the tooltips.

I don't know enough about what is happening in the process of loading content on demand to know what might be going wrong with the third party control. Something odd is happening in the AjaxUpdate bit.

any help is greatly appreciated

thanks in advance

2 Answers, 1 is accepted

Sort by
0
Svetlina Anati
Telerik team
answered on 22 Jun 2009, 01:28 PM

Hello andieje,

I am not sure about your exact setup and configuration but as far as I can see it is due to the fact that the map loads its old data from the ViewState. When we add to the tooltip controls with ViewState we have to make sure that these controls are created before the LoadViewState event fires so that their ViewState information is loaded. In order to avoid forcing our clients to recreate all their controls in the Init event on postback, we decided to fire the AjaxUpdate event earlier in the page lifecycle. That is most probably why the map takes its old data from the ViewState and does not get updated.

In order to get the desired result, you should configure the new map value in the user control's PrePender event. Please, test whether this solves the problem and let us know how it goes.


Sincerely yours,

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.
0
andieje
Top achievements
Rank 1
answered on 30 Jun 2009, 06:40 PM
Hello

It was indeed a ViewState issue.

Many thanks
Tags
ToolTip
Asked by
andieje
Top achievements
Rank 1
Answers by
Svetlina Anati
Telerik team
andieje
Top achievements
Rank 1
Share this question
or