Tooltip width not working in grid

4 posts, 1 answers
  1. Craig
    Craig avatar
    20 posts
    Member since:
    Aug 2006

    Posted 22 Feb 2010 Link to this post

    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
  2. Answer
    Svetlina Anati
    Admin
    Svetlina Anati avatar
    2795 posts

    Posted 23 Feb 2010 Link to this post

    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.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Craig
    Craig avatar
    20 posts
    Member since:
    Aug 2006

    Posted 23 Feb 2010 Link to this post

    That did it!

    Thanks Svetlina.

    Craig
  5. Svetlina Anati
    Admin
    Svetlina Anati avatar
    2795 posts

    Posted 26 Feb 2010 Link to this post

    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.
Back to Top