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

RadGrid Tooltip on Cell, truncates tooltip content

4 Answers 203 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Anthony
Top achievements
Rank 1
Anthony asked on 18 May 2011, 05:15 PM
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


4 Answers, 1 is accepted

Sort by
0
Gimmik
Top achievements
Rank 1
answered on 23 May 2011, 08:46 PM
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
0
Anthony
Top achievements
Rank 1
answered on 24 May 2011, 08:50 AM
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
0
Pavlina
Telerik team
answered on 24 May 2011, 12:29 PM
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.

0
Gimmik
Top achievements
Rank 1
answered on 24 May 2011, 03:26 PM
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>
Tags
Grid
Asked by
Anthony
Top achievements
Rank 1
Answers by
Gimmik
Top achievements
Rank 1
Anthony
Top achievements
Rank 1
Pavlina
Telerik team
Share this question
or