Tool Tip not showing up!

7 posts, 1 answers
  1. Sébastien
    Sébastien avatar
    55 posts
    Member since:
    Jun 2010

    Posted 14 Jul 2010 Link to this post

    In a simple application with a radToolBar, I am trying to change the toolTip of the item clicked on client-side code. The value of the property is changed but it won't appear as a toolTip.

    Here is the code, very sample :
    <%@ Page Language="VB" AutoEventWireup="false" CodeBehind="Default.aspx.vb" Inherits="ToolTipNotShowing._Default" %>
     
    <!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">
            function toolTipError(sender, args) {
                var btn = args.get_item();
                var btnText = btn.get_text();
                btn.set_toolTip(btn.get_text() + " TOOLTIP");
                var txt = $find("<%= RadTextBox1.ClientID %>");
                txt.set_value(btn.get_toolTip());
            }
        </script>
        <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">
        </telerik:RadAjaxManager>
      
        <telerik:RadSkinManager ID="RadSkinManager1" Runat="server" Skin="Simple">
        </telerik:RadSkinManager>
        <div>
            <telerik:RadToolBar ID="RadToolBar1" Runat="server" Skin="Windows7"
                                OnClientButtonClicked="toolTipError">
                <Items>
                    <telerik:RadToolBarButton runat="server" Text="Button 0">
                    </telerik:RadToolBarButton>
                    <telerik:RadToolBarButton runat="server" Text="Button 1">
                    </telerik:RadToolBarButton>
                    <telerik:RadToolBarButton runat="server" Text="Button 2">
                    </telerik:RadToolBarButton>
                    <telerik:RadToolBarButton runat="server" Text="Button 3">
                    </telerik:RadToolBarButton>
                    <telerik:RadToolBarButton runat="server" Text="Button 4">
                    </telerik:RadToolBarButton>
                </Items>
            </telerik:RadToolBar>
            <br />
        </div>
     
        <p>
            <telerik:RadTextBox ID="RadTextBox1" Runat="server">
            </telerik:RadTextBox>
        </p>
     
        </form>
    </body>
    </html>
  2. Answer
    Princy
    Princy avatar
    17421 posts
    Member since:
    Mar 2007

    Posted 15 Jul 2010 Link to this post

    Hello Sebastien,

    You can try the following method to set ToolTip.

    Java Script:
    <script type="text/javascript">
           function toolTipError(sender, args) {
               var btn = args.get_item();
               var btnText = btn.get_text();
               btn.set_toolTip(btn.get_text() + " TOOLTIP");
               var txt = $find("<%= RadTextBox1.ClientID %>");
               txt.set_value(btn.get_toolTip());
               btn.get_linkElement().title = btn.get_text() + " TOOLTIP"; //setting ToolTip
           }
       </script>

    Thanks,
    Princy.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Sébastien
    Sébastien avatar
    55 posts
    Member since:
    Jun 2010

    Posted 15 Jul 2010 Link to this post

    Thanks, it looks like it's working!
  5. Sébastien
    Sébastien avatar
    55 posts
    Member since:
    Jun 2010

    Posted 16 Jul 2010 Link to this post

    Your solution is working fine, but just out of curiosity what is the problem with the set_toolTip method in this code. Is it a bug on your side or it is only doing this to my code.
  6. Yana
    Admin
    Yana avatar
    4554 posts

    Posted 21 Jul 2010 Link to this post

    Hi Sébastien,

    There's some problem with set_toolTip() method which we'll reasearch and fix. Thank you for reporting this.

    Best regards,
    Yana
    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
  7. Rudá Cunha
    Rudá Cunha avatar
    50 posts
    Member since:
    Mar 2010

    Posted 25 Feb 2011 Link to this post

    The problem is still happening in Q3 2010
  8. Yana
    Admin
    Yana avatar
    4554 posts

    Posted 01 Mar 2011 Link to this post

    Hi Rudá Cunha,

    The fix of this issue was delayed due to more urgent tasks. We're sorry for the inconvenience.

    Greetings,
    Yana
    the Telerik team
    Registration for Q1 2011 What’s New Webinar Week is now open. Mark your calendar for the week starting March 21st and book your seat for a walk through all the exciting stuff we ship with the new release!
Back to Top
UI for ASP.NET Ajax is Ready for VS 2017