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

Using RadToolTip to load Textbox or RadTextBox

2 Answers 162 Views
ToolTip
This is a migrated thread and some comments may be shown as answers.
IQworks
Top achievements
Rank 1
IQworks asked on 27 Jul 2009, 10:55 PM
 Hi, 
   The problem is that when I press the button, I dont see either the TEXTBOX or the RADTEXTBOX clientside. I am wondering the best way to do this. I have tried using various combinations of javascript to have TEXTBOX1 appear clientside, but with no success.  I didnt want to show every combination I tried , so here is just the basic attempt.   

This is the aspx .....  
<%@ Page Language="C#"   MaintainScrollPositionOnPostback="true"%> 
<%@ Register TagName="IQeqpTag" TagPrefix="IQeqpPrefix" Src="~/mybodyscience/V02/iqControls/a_test_iqLocationsTEST.ascx" %> 
<%@ Register assembly="AjaxControlToolkit" namespace="AjaxControlToolkit" tagprefix="cc1" %> 
   
<%@ Register assembly="Telerik.Web.UI" namespace="Telerik.Web.UI" tagprefix="telerik" %> 
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"  
"http://www.w3.org/TR/html4/strict.dtd"> 
   
<%-- QUIRKS MODE MAKES THIS PAGE WORK IN FIREFOX <!doctype HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> --%> 
   
 
<script runat="server">  
    
      
     
</script> 
<html xmlns="http://www.w3.org/1999/xhtml" > 
<head id="Head1" runat="server">  
    <title>Untitled Page</title>   
</head> 
<body > 
    <form id="form1" runat="server">  
 
  <asp:ScriptManager ID="ScriptManager1" runat="server">  
    </asp:ScriptManager>       
     <table align="center" >    
        
     <tr> 
      <td align="center" width="100%">  
        <strong><span style="font-size: 14pt; color: #3300ff; " >Equipment Descriptions  
             <br /> 
        </span></strong>  
      </td> 
      </tr> 
     
    </table>    
     
         
    <table id="tqtable" align="center" border="0">         
      <tr>   
     <td style="width: 400px" >       
       <IQeqpPrefix:IQeqpTag ID="iqaTLocationUC"   runat="server" /> 
      </td>        
    </tr>   
    </table> 
     
  </form> 
</body> 
</html> 
 

This is the ascx .... 
<%@ Control Language="C#"  AutoEventWireup="true" %>   
<%@ Import namespace="System.Data" %> 
<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %> 
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 
 
 <script runat="server">    
  
      
       
</script> 
 
<script language="javascript" type="text/javascript">  
     
 
   
</script>    
   
        
    
 <div id="lcsDataEntry" runat="server">    
    <asp:UpdatePanel ID="UpdatePanel188"  runat="server">  
 <ContentTemplate> 
   <asp:Button  ID="lcsAddLocation" runat="server" Text="Add a New Location" 
     ToolTip="Adds d new Location"    
     BorderWidth="2" BorderStyle="Solid" CausesValidation="false"            
     Font-Bold="true" Font-Size="Smaller" > 
   </asp:Button>   
   
  <telerik:RadToolTip ID="iqQAddRadToolTip" runat="server" 
Skin="Office2007"  ShowEvent="OnClick"   
Position="Center" RelativeTo="Element" 
Title="Enter New Location"    
Modal="True"  ShowDelay="0"     
ShowCallout="True" Height="100px"   Width="250px" TargetControlID="lcsAddLocation"    
  HideEvent="ManualClose">    
    
  <asp:TextBox ID="TextBox2"  runat="server" Height="50px" TextMode="MultiLine" Width="220px"></asp:TextBox>    
   
</telerik:RadToolTip>    
      
  </ContentTemplate> 
   </asp:UpdatePanel>     
      
     
   </div>    
      
  

thanks for your time.

2 Answers, 1 is accepted

Sort by
0
IQworks
Top achievements
Rank 1
answered on 28 Jul 2009, 08:56 PM
Please disregard the previous post.
The problem was that I had the ToolTip property set within the targetcontrol.
It seems that if you have a control, like a button for instance, and you have a radtooltip with its targetcontrolID property pointing to that button, then you cannot have the tooltip property set within the button. It looks like loading this radtooltip will default to the buttons tooltip property not the radtooltip.
Sorry,thanks
0
Svetlina Anati
Telerik team
answered on 29 Jul 2009, 01:58 PM

Hi IQworks,

I am glad you found teh problem yourself. I believe that the following information will shed some light on the behavior you describe:

One of the main purposes [among others] of RadToolTip is to be used as a replacement of the "standard browser tooltip". This is the reason that the tooltip, as its highest priority reads the title attribute of the element (or ToolTip server property) (as it is the title attribute that causes a browser tooltip to be displayed).

As a result, in fact there are 3 ways to display content in a tooltip - by reading its TargetControl's title attribute, by setting the RadToolTip's Text property, or by writing HTML between the RadToolTip opening and closing tags.

I hope this information helps.

Here is the correct priority for the three approaches to setting the RadToolTip content:

1. RadToolTip Text property
2. [target control] title attribute / ToolTip server property
3. RadToolTip content between opening/closing tags


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
IQworks
Top achievements
Rank 1
Answers by
IQworks
Top achievements
Rank 1
Svetlina Anati
Telerik team
Share this question
or