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

I want to use RadTooltip as a type of messagebox, is that possible. ?

5 Answers 93 Views
ToolTip
This is a migrated thread and some comments may be shown as answers.
johan stenstrom
Top achievements
Rank 1
johan stenstrom asked on 04 Jun 2010, 08:51 AM
I want to use  RadTooltip as a clever  type of  " messagebox " with a few standard asp controls on it. , is that possible. ?
To use  Radtooltip would be very usefull in my project. 

I have all code in place the only obstacle left is that I cant find out how to show RadTooltip1 from code behind when I want to.

I dont want to show the tooltip using the standard methods, like on_click, got focus, 
 
Just a simple line of in code behind (vb)  
radtooltip.show() ..  (It don't work) .. Do I need java script on the aspx code to ? 

 Best regards
Johan 

5 Answers, 1 is accepted

Sort by
0
Princy
Top achievements
Rank 2
answered on 04 Jun 2010, 09:02 AM
Hi Joha,

When you have ShowEvent="FromCode" you should programmatically show the tooltip. This can be done both on the client and on the server side. To show the tooltip from the server you should call its server method Show() as shown below.

cs:
 
RadToolTip1.Show(); 


Regards,
Princy.
0
johan stenstrom
Top achievements
Rank 1
answered on 04 Jun 2010, 09:44 AM
I have taken a fresh radtoolptip from the toolbox in my visualstudio2010 (telerik 2009, Q3). I placed it ontop of other controls ( a map ) . I gets the name radtooltip1

I have adjusted the tooltip parameters  ShowEvent="FromCode" and set the modal property=true. 

From code behind the code looks like this..  
    RadToolTip1.Show()

Still no tooltip shows, is the tooltip alwas ontop off other controls ? 

Best 
Johan 


apsx 

 <div id="DIVtooltip" style="width:100%;height:100%;top:25px;left:0px;position:absolute;font-family:Verdana;font-size:11px;visibility:hidden;">
        <telerik:RadToolTip ID="RadToolTip1" runat="server" Height="284px" Modal="True" 
           Skin="Telerik" Title="Detta är en tooltip från codebehind." Width="284px" 
           ShowEvent="FromCode">
           <asp:Button ID="Button1" runat="server" Text="Button" 
               style="top: 309px; left: 7px; position: absolute; height: 26px; width: 56px" />
           <asp:Button ID="Button2" runat="server" 
               style="top: 309px; left: 69px; position: absolute; height: 26px; width: 56px" 
               Text="Button" />
           <asp:Button ID="Button3" runat="server" 
               style="top: 309px; left: 137px; position: absolute; height: 26px; width: 56px" 
               Text="Button" />
           <asp:Label ID="Label1" runat="server" Text="Label"></asp:Label>
           <asp:Label ID="Label2" runat="server" 
               style="top: 159px; left: 3px; position: absolute; height: 19px; width: 34px" 
               Text="Label"></asp:Label>
       </telerik:RadToolTip>
       </div>

__________________________
  VB code behind. 

        ScriptManager.RegisterClientScriptBlock(Page, Page.GetType(), "DIVHtooltip", "document.getElementById('DIVtooltip').style.visibility = 'visible';", True)
        RadToolTip1.Show()

0
Svetlina Anati
Telerik team
answered on 09 Jun 2010, 09:20 AM
Hello johan,

As far as I can see from your code you have not specified the RelativeTo and TragetControlID properties. Please note that the default value of the RelativeTo property is Mouse and for this mode and for the RelativeTo="Element" it is required to specify TargetControlID. However, in your case you can set RelativeTo="BrowserWindow" and this should be enough to solve the issue since this mode is designed for such cases and does not need a target.

I also believe that the following demo might be helpful:

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


I hope that my reply is helpful, let me know how it goes.

Greetings,
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
johan stenstrom
Top achievements
Rank 1
answered on 09 Jun 2010, 09:47 AM
Dear support,

Yes I have been trying your RadToolTip control in a new project. It work's as described above. 
a line of code  -->  RadToolTip1.show() shows the tooltip as it should and described in the manual.

However in my project which have grow BIG, contains a lot of other Rad AJAX controlls like radmenu, radgrid, radtooltipmanager....
the radtooltip1 does not show using the same method as I was successfull showing with a new empty project.    


How can I restore the RAD ASP.NET AJAX functionality ?  Perhaps I have destroyed something in webconfig or 
javascript in my aspx page? 

Best regards. 
Johan 

0
Svetlina Anati
Telerik team
answered on 14 Jun 2010, 09:54 AM
Hello johan,

Every time when using AJAX and you change some server property of any control (no matter RadControl or standard asp control) you should update the control which is changed itself as well. The server method Show() of the tooltip actually "tells" the tooltip  that it should be visible and thus you should also update it. This being said, make sure that you update the tooltip as well (e.g add the needed AJAX settings) and if everything else is correctly configured the problem should disappear.


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.
Tags
ToolTip
Asked by
johan stenstrom
Top achievements
Rank 1
Answers by
Princy
Top achievements
Rank 2
johan stenstrom
Top achievements
Rank 1
Svetlina Anati
Telerik team
Share this question
or