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

Dynamic tooltip content disappears after Ajax update

2 Answers 185 Views
ToolTip
This is a migrated thread and some comments may be shown as answers.
Larkin Young
Top achievements
Rank 2
Larkin Young asked on 09 Sep 2007, 02:08 PM
Hopefully you can repro this without me having to put together a sample project, but the basic scenario is that I have tooltip objects that are creating in the ItemDataBound event handler or a Repeater. In this ItemDataBound event handler I am creating some content within a Panel that I then add to the ToolTip's controls collection. Works fine on page load, but after an Ajax update the tooltip pops up, but without any content. After reviewing the HTML source it appears that the Panel that is added to the ToolTip's controls collection is not rendered to the client.

Any initial ideas as to the cause?

Thanks,
Larkin

2 Answers, 1 is accepted

Sort by
0
Peter
Top achievements
Rank 1
answered on 10 Sep 2007, 12:44 AM
I'm encountering a very similar situation - I don't have time at the moment to put together a sample scenario. 

I'm using the tooltipmanager, with one linkbutton assigned as a target control  In the repeater's itemdatabound I'm adding other targets, which work exactly once.  After that the linkbutton that was assigned initially in the .aspx still works, but none of the dynamically added targets work.  If it matters, I'm using the on click event.
0
Larkin Young
Top achievements
Rank 2
answered on 10 Sep 2007, 05:29 AM
Actually, I resolved my problem..and I feel foolish for not seeing this. I had the Repeater control being bound on every page load, or so I thought until another developer changed this to only happen on initial load. Since the Panel I added to the ToolTip's controls collection wasn't being tracked by viewstate it wasn't being reloaded on postback, hence the disappearance of the content. I modified the page slightly and declared the content panel in the ItemTemplate of the Repeater, within the ToolTip element and simply bound the necessary dynamic properties in the ItemDataBound event. Worked fine after that..my guess is that this is your problem as well.

- Larkin
Tags
ToolTip
Asked by
Larkin Young
Top achievements
Rank 2
Answers by
Peter
Top achievements
Rank 1
Larkin Young
Top achievements
Rank 2
Share this question
or