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

tooltip doesn't display in complex scenario

1 Answer 58 Views
ToolTip
This is a migrated thread and some comments may be shown as answers.
TonyG
Top achievements
Rank 1
TonyG asked on 12 May 2009, 10:17 PM

I have been able to get RadToolTipManager working in one project, creating everything dynamically, but when I port that code to another more complex project it doesn't seem to work.  I think I'm missing something simple.

 

In the first project I have an asp:UpdatePanel with a PlaceHolder.

In my Page_Init I initialize a RadToolTipManager, and set AjaxUpdate as follows:

  tipManager.AjaxUpdate += new ToolTipUpdateEventHandler(tipManager_AjaxUpdate);

One or more asp:ImageButton controls are "tooltipified" by adding them using this:

  tipManager.TargetControls.Add(ControlID , Value , IsClient);

Then the manager is added to the Controls collection of the PlaceHolder.

Mouseover events properly fire over the controls, the handler is invoked, and the panel is properly loaded with a defined user control.

 

I take that code to a project with a master page, a content page, and dynamically loaded user controls.

When a user control is initialized, a PlaceHolder is populated with the RadToolTipManager.
I have a single asp:Button that I'm trying to tooltipify.

The PlaceHolder is on an asp:Panel which is ajaxified at PreRender time using this:
  AjaxManager.AjaxSettings.AddAjaxSetting(PanelX , PanelX);

 

At PreRender time I also reset the text of the TargetControls based on the status of the page, and (not sure if this helps or hurts), I ajaxify each RadToolTipManager I find in the Placeholder:
  AjaxManager.AjaxSettings.AddAjaxSetting(btnMyButton,tipManager);

I don't know why but a mouseover on the button will show a .ToolTip value which was added directly to the control, but the AjaxUpdate event isn't fired on the RadToolTipManager.

I've also set the ajax manager to update the container panel whenever the button is updated:
  AjaxManager.AjaxSettings.AddAjaxSetting(btnMyButton,PanelX);

Is you can see, I'm trying to ajaxify everything to figure out what triggers the manager's AjaxUpdate event, but haven't had any luck.  I don't know if we need to ajaxify just the panel containing the placeholder, the placeholder, the manager, each ToolTipTargetControl in the manager...?

Thanks for your patience.

1 Answer, 1 is accepted

Sort by
0
Svetlina Anati
Telerik team
answered on 16 May 2009, 09:49 AM
Hello TonyG,

I am not sure what is the exact problem since I cannot debug your code. However, knowing that the issue occurs with a MasterPage and does not with a sample page, I assume that it might be caused by the fact that the MasterPage is an INaming Container and changes the IDs of the controls. What I can suggest is to make sure that the following code:

tipManager.TargetControls.Add(ControlID , Value , IsClient);

actually contains the ClientID of the target control and not its ID, e.g:

tipManager.TargetControls.Add(Button1.ClientID , Value , true);

On a side note, when updating the target controls of a RadToolTipManager, you should also update the manager in order to update its TargetControls collection as explained in the following demo:

http://demos.telerik.com/aspnet-ajax/tooltip/examples/targetcontrolsandajax/defaultcs.aspx

In case the problem persists, please open a new support ticket and send me a sample, fully runnable reproduction demo along with detailed reproduction steps and explanations of the actual and the desired behavior and I will do my best to help.

Regards,
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.
Tags
ToolTip
Asked by
TonyG
Top achievements
Rank 1
Answers by
Svetlina Anati
Telerik team
Share this question
or