RadGrid Tooltip on Cell, truncates tooltip content

5 posts, 0 answers
  1. Anthony
    Anthony avatar
    26 posts
    Member since:
    Mar 2009

    Posted 18 May 2011 Link to this post

    Hi I have a RadGrid

    On the Grid ItemDatabound event i am adding a tooltip dependant of the Cell content, I call a seperate method that builds a string and assigns it as the tooltip.  All is working well but on one of the Tooltips the text is truncated, is there a max length setting on the tooltip ? If So is there a workaround to construct a longer string.

    Im using a string builder to construct the string which is 743 characters. The tooltip seems to truncate anything after 512 characters

    Any ideas ?

    Thanks


  2. Gimmik
    Gimmik avatar
    170 posts
    Member since:
    May 2011

    Posted 23 May 2011 Link to this post

    Hi Anthony,

    Nice avatar. I just setup a sample tooltip with more then 1000 characters as a test. I didn't have any issues. Did you try setting a breakpoint and checking that the string coming out of your string-builder isn't truncated?

    -Gimmik
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Anthony
    Anthony avatar
    26 posts
    Member since:
    Mar 2009

    Posted 24 May 2011 Link to this post

    Hi Gimmik

    Any chance you could post your example so i can compare it to mine ? Checked the string returned from the string biulder and it returns the full string as expected.

    Thanks
  5. Pavlina
    Admin
    Pavlina avatar
    6084 posts

    Posted 24 May 2011 Link to this post

    Hello Anthony,

    Attach to the OnClientShow of tooltip - this event is fired after the tooltip is shown and rendered on the page. You can calculate the size of the content area and based on your findings you can set different size or overflow.

    Refer to the forum thread below which elaborates on this subject:
    http://www.telerik.com/community/forums/aspnet-ajax/tooltip/radtooltip-auto-height-sizing.aspx

    All the best,
    Pavlina
    the Telerik team

    Browse the vast support resources we have to jump start your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.

  6. Gimmik
    Gimmik avatar
    170 posts
    Member since:
    May 2011

    Posted 24 May 2011 Link to this post

    Hi Anthony,

    This is all I did. It's really simple. Can you modify it so it has the same issue you're seeing?

    Thanks,
    -Gimmik

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
     
    <head runat="server">
        <title></title>
        <telerik:RadStyleSheetManager id="RadStyleSheetManager1" runat="server" />
    </head>
    <body>
        <form id="form1" runat="server">
        <telerik:RadScriptManager ID="RadScriptManager1" runat="server">
            <Scripts>
                <%--Needed for JavaScript IntelliSense in VS2010--%>
                <%--For VS2008 replace RadScriptManager with ScriptManager--%>
                <asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.Core.js" />
                <asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.jQuery.js" />
                <asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.jQueryInclude.js" />
            </Scripts>
        </telerik:RadScriptManager>
        <script type="text/javascript">
            //Put your JavaScript code here.
        </script>
        <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">
        </telerik:RadAjaxManager>
        <div>
            <telerik:RadButton ID="RadButton1" runat="server" Text="Target">
            </telerik:RadButton>
            <telerik:RadToolTip runat="server" TargetControlID="RadButton1">
                012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789<br />
                012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789<br />
                012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789<br />
                012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789<br />
                012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789<br />
                012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789<br />
                012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789<br />
                012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789<br />
                012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789<br />
                012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789<br />
                This text is after 1000 characters.
            </telerik:RadToolTip>
        </div>
        </form>
    </body>
    </html>
Back to Top
UI for ASP.NET Ajax is Ready for VS 2017