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

ToolTip Contents

4 Answers 152 Views
ToolTip
This is a migrated thread and some comments may be shown as answers.
DukeVideo
Top achievements
Rank 1
DukeVideo asked on 24 Apr 2008, 08:11 AM

Hi,

I have the following code:

<span id="spanBasketHelp" class="help"><id="aBasketHelp" href="#" title="Click for Help" accesskey="h">Help</a></span></h2> 
        <telerik:RadToolTip ID="radHelpToolTip" runat="server" 
            width="300px" 
            ShowEvent="OnClick" 
            RelativeTo="Element" 
            Animation="Resize" 
            TargetControlId="aBasketHelp" 
            IsClientID="true" 
            Sticky="true" 
            Position="TopLeft"        
            Skin="Web20" > 
            <div>Your Basket is like a real basket in a store. It contains all the items you have selected for purchase. As you add things to your Basket, your total will be updated so you always know exactly how much you are spending."</div> 
</telerik:RadToolTip>    

I would expect the contents of the <div> to appear within the ToolTip, but all I get is the Title of the anchor ("CLick for Help") INSIDE the bubble.

Any ideas? I would like to implement some rich formatting within the bubble.


And by the way, your web site is extremely slow.

4 Answers, 1 is accepted

Sort by
0
Tsvetie
Telerik team
answered on 25 Apr 2008, 08:29 AM
Hello DukeVideo,
You have to remove the title of the anchor to get the content you have added between the opening and closing tags of the RadToolTip, in it:
<body> 
    <form id="form1" runat="server">  
        <asp:ScriptManager ID="ScriptManager1" runat="server" /> 
        <span id="spanBasketHelp" class="help"><id="aBasketHelp" href="#"   
            accesskey="h">Help</a></span></h2> 
        <telerik:RadToolTip ID="radHelpToolTip" runat="server" Width="300px" ShowEvent="OnClick" 
            RelativeTo="Element" Animation="Resize" TargetControlID="aBasketHelp" IsClientID="true" 
            Sticky="true" Position="TopLeft" Skin="Web20">  
            <div> 
                Your Basket is like a real basket in a store. It contains all the items you have  
                selected for purchase. As you add things to your Basket, your total will be updated  
                so you always know exactly how much you are spending."</div> 
        </telerik:RadToolTip> 
    </form> 
</body> 

We do understand that the content should have precedence over the title of the TargetElement, and we have plans to change that, but for the time being, I cannot tell you when this will be implemented.

Best wishes,
Tsvetie
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
0
John Davis
Top achievements
Rank 2
answered on 16 Feb 2009, 05:29 AM
In the radgrid itemcreated event, I setup tooltip for grid header:

header[

"EOD"].ToolTip = "End of Distribution <br> -2 means NOT EOD item <br/> >= 0 means BF tries to maintain this quantity <br/> usually very low demand items are EOD items";

 


How can I get the tool tip content to display with line breaks like:

 

End of Distribution
  -2 means NOT EOD item 
  >= 0 means BF tries to maintain this quantity
 usually very low demand items are EOD items

Instead the tags such as <br> display as text.

Steve

 

0
Svetlina Anati
Telerik team
answered on 19 Feb 2009, 09:48 AM
Hello John,

As far as I understand from your code you want to use the RadToolTipManager's AutoTooltipify functionality and automatically replace the standard tooltip with a RadToolTip. I prepared a sample demo based on your code but what I noticed was that the standard browser tooltip works as you explain and the RadToolTip works as expected. Would you please examine the attached demo and in case you need further assistance, modify it in order to reproduce the problem? After that you should just open a new support ticket and send us the modified demo along with detailed explanations of the actual and the desired behavior and some screenshots.


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.
0
John Davis
Top achievements
Rank 2
answered on 19 Feb 2009, 04:10 PM
Thank you.  Your example helped me solve the problem by adding the following:

 

<rad:RadToolTipManager ID="manager" runat="server" AutoTooltipify="true">

 

 

</rad:RadToolTipManager></td>

 



Without the RadToolTipManager, the tooltip would display as desired except the html tags <br /> were displayed instead of being interpreted as line breaks.

Steve
Tags
ToolTip
Asked by
DukeVideo
Top achievements
Rank 1
Answers by
Tsvetie
Telerik team
John Davis
Top achievements
Rank 2
Svetlina Anati
Telerik team
Share this question
or