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

ToolTip as a dialog

1 Answer 50 Views
ToolTip
This is a migrated thread and some comments may be shown as answers.
rwozniak
Top achievements
Rank 1
rwozniak asked on 27 Oct 2008, 02:22 PM
I'm trying to move all of my dialogs, which currently use the RadWindow, over to RadToolTip or RadToolTipManager...not sure yet which is best.

As a simple example, I'd like to have it so that when a user clicks on a button, I display the dialog with an ascx loaded into it. On my aspx test page I have a RadAjaxManager, a RadToolTipManager a RadScriptManager and the button. The codebehind is shown below.

In Page_Load I set the button as an ajax trigger and a TargetControl of the ToolTipManager. In the button's event handler I load the ascx and call Show, but it doesn't work.

Any suggestions? I couldn't find an example in the demo section of the site that could get me over the hump. By the way, I'd really like to achieve this without any custom JavaScript if I can help it, though if I have to return a single line as an AJAX response script that wouldn't be the worst thing in the world.

 

protected void Page_Load(object sender, EventArgs e)

 

{

AjaxManager1.AjaxSettings.AddAjaxSetting(MyButton, ToolTipManager);

ToolTipManager.TargetControls.Add(MyButton.ClientID);

}

 

protected void MyButton_Click(object sender, EventArgs e)

 

{

ToolTipManager.UpdatePanel.ContentTemplateContainer.Controls.Add(LoadControl(

"MyControl.ascx"));

 

ToolTipManager.Show();

}

1 Answer, 1 is accepted

Sort by
0
Svetlina Anati
Telerik team
answered on 29 Oct 2008, 01:51 PM
Hello rwozniak,

The RadToolTipManager differs from the RadToolTip control. In order to achieve the desired behavior you should use its LoadOnDemand functionality and add the desired user control in its OnAjaxUpdate event as shown in this online demo.

I also strongly recommend to examine the following demos in order to get a better understanding of the RadToolTipManager usage and specifics:

http://demos.telerik.com/ASPNET/Prometheus/ToolTip/Examples/ToolTipVersusToolTipManager/DefaultCS.aspx
http://demos.telerik.com/ASPNET/Prometheus/ToolTip/Examples/ToolTipManager/DefaultCS.aspx



Best wishes,
Svetlina
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
Tags
ToolTip
Asked by
rwozniak
Top achievements
Rank 1
Answers by
Svetlina Anati
Telerik team
Share this question
or