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

Tooltip width not working in grid

3 Answers 86 Views
ToolTip
This is a migrated thread and some comments may be shown as answers.
Craig
Top achievements
Rank 1
Craig asked on 23 Feb 2010, 05:20 AM
Hoping there is a better work around for this.

I have a description column in a grid and I want to have a set width and not have the text wrap. I then want to have a tooltip show the full description when the user moses over the text.

The issue is that the tooltip does not recognize the width when wrap=true is set on the column. If I take the wrap off everything works fine. My solution was to create another field in my dataset that is only a fixed number of characters wide and then set the tool tip to the full description. it works but I am wondering if there is some other setting that I can still have Wrap=false and have the tooltip not stretch across the screen.

<telerik:GridTemplateColumn DataField="description" HeaderText="Description"   
                        SortExpression="description" UniqueName="description" AllowFiltering="false">  
                        <ItemStyle Width="160px" Wrap="false"/>  
                        <HeaderStyle Width="160px" /> 
                        <ItemTemplate> 
                            <asp:Label ID="Label1" runat="server" Text='<%# Eval("partDescrip") %>'></asp:Label> 
                                <telerik:RadToolTip ID="RadToolTip1" runat="server" TargetControlID="Label1"   
                                    RelativeTo="Element" Position="MiddleRight" Width="175px" AutoCloseDelay="0" > 
                                    <%# Eval("description") %> 
                                </telerik:RadToolTip> 
                        </ItemTemplate> 
                    </telerik:GridTemplateColumn> 

The biggest issue is that the formating of the column is not very clean because the width of each charcater is slightly differnt (kerning).

Thanks,
Craig

3 Answers, 1 is accepted

Sort by
0
Accepted
Svetlina Anati
Telerik team
answered on 23 Feb 2010, 12:36 PM
Hello Craig,

I assume that the tooltip inherits some styles from the grid since both of them are actually TABLE elements. What I suggest is to set RenderInPageRoot="true" for the tooltip and test again whether this fixes the issue.

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
Craig
Top achievements
Rank 1
answered on 23 Feb 2010, 04:23 PM
That did it!

Thanks Svetlina.

Craig
0
Svetlina Anati
Telerik team
answered on 26 Feb 2010, 09:48 AM
Hello Craig,

I am glad I could help! In case you experience any further problems or you have additional questions do not hesitate to contact us again.

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