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

[Solved] Pop up element inside Grid with rich text formatting

1 Answer 123 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Sid
Top achievements
Rank 1
Sid asked on 01 May 2013, 07:49 AM
Hi all,

The scenario is as follows:
I have a datasource, which contains a string called "comments" which has rich text. When I bind it to the Grid, I am trying to display the column as an icon and when user hovers over the icon the tooltip is displayed with the text. I used the following code:
My problem is that the tooltip does not show the formatted rich text, it only displays the normal text, without line breaks etc. Is there any way to show rich text on the tooltip or using any other mechanism inside the grid?

<telerik:GridTemplateColumn HeaderStyle-Width="20px" UniqueName="Comments" AllowFiltering="false"
 ItemStyle-VerticalAlign="Bottom" ItemStyle-HorizontalAlign="Left" HeaderText="Comments">
 <ItemTemplate>
 <asp:Image ID="imgInfo" runat="server" ImageUrl="<% $WSSUrl:~info.png%>" />
<telerik:RadToolTipManager runat="server" ID="radTTMgrInfo"  Position="BottomRight" RelativeTo="Element" Width="600px" Height="600px" Animation="Fade" ShowCallout="false" OffsetX="-70" OffsetY="-1" ShowDelay="0" ShowEvent="OnMouseOver" HideEvent="FromCode" OnClientBeforeHide="OnClientBeforeHide" OnClientShow="OnClientShow" Text=' <%# Eval("Comments") %>' ContentScrolling="Y">
<TargetControls>
 <telerik:ToolTipTargetControl TargetControlID="imgInfo" />
 </TargetControls>
 </telerik:RadToolTipManager>
</ItemTemplate>
</telerik:GridTemplateColumn>

1 Answer, 1 is accepted

Sort by
0
Vasil
Telerik team
answered on 03 May 2013, 03:40 PM
Hi Sid,

You can place your rich text inside UserControl as shown in this demo:
http://demos.telerik.com/aspnet-ajax/tooltip/examples/loadondemand/defaultcs.aspx
Inside the control you can place the HTML.

Kind regards,
Vasil
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
Tags
Grid
Asked by
Sid
Top achievements
Rank 1
Answers by
Vasil
Telerik team
Share this question
or