Setting ToolBar Button's ToolTip Client-side

7 posts, 1 answers
  1. Stuart Hemming
    Stuart Hemming avatar
    1622 posts
    Member since:
    Jul 2004

    Posted 29 Oct 2012 Link to this post

    Some 3 years ago, in this thread, a user pointed out that there was a problem using the RadToolBarClientObject's set_toolTip() function.

    I note that using the 2012 Q3 controls that we are still having this problem.

    Back then, Veselin recommended using get_linkElement().title as a workaround.

    Whilst this works, you end up with 2 different tooltuips if you are decorating the tooltips on the page using a RadToolTipManager.

    Can we get this issue addressed in the more immediate future, do you think?

    --
    Stuart
  2. Stuart Hemming
    Stuart Hemming avatar
    1622 posts
    Member since:
    Jul 2004

    Posted 29 Oct 2012 Link to this post

    For clarification, you can see the issue if you run the following code ...
    <html>
    <head runat="server">
        <title></title>
      
    </head>
    <body>
        <form id="form1" runat="server">
        <telerik:RadScriptManager ID="RadScriptManager1" runat="server">
        </telerik:RadScriptManager>
        <telerik:RadScriptBlock runat="server" ID="RadScriptBlock1">
            <script type="text/javascript">
                function ClientButtonClicked(sender, e)
                {
                    e.get_item().get_linkElement().title = e.get_item().get_toolTip() + "...";
                }
            </script>
        </telerik:RadScriptBlock>
        <div>
            <telerik:RadToolBar ID="RadToolBar1" runat="server" style="width:100%;" OnClientButtonClicked="ClientButtonClicked">
                <Items>
                    <telerik:RadToolBarButton Text="Add" ToolTip="Add" />
                </Items>
            </telerik:RadToolBar>
            <telerik:RadToolTipManager runat="server" ID="RadToolTipManager1" AutoTooltipify="true" />
        </div>
        </form>
    </body>
    </html>

    Just hover over the button see the tooltip, then click the botton and move the curor away from and back over the button.

    --
    Stuart

  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Kate
    Admin
    Kate avatar
    1898 posts

    Posted 01 Nov 2012 Link to this post

    Hi Stuart,

    Indeed the set_toolTip() function still does not work as expected. I forwarded your request to our development team, however, so that the issue can be fixed shortly. Can you please clarify why you need to set the tooltip the first time using the RadToolTipManager and the second time using the OnClientButtonClicked event?

    To clarify a bit more, here is how the page that you provided works. On page init, the RadToolTipManager clears the title attributes and sets the tooltips. Then on button hover, the tooltip works as expect. After buttonclicking however, an additional title is set with the ClientButtonClicked function. Thus, you get the two tooltips showing.

    All the best,
    Kate
    the Telerik team
    If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
  5. Stuart Hemming
    Stuart Hemming avatar
    1622 posts
    Member since:
    Jul 2004

    Posted 02 Nov 2012 Link to this post

    Hi Kate,

    The example I submitted was a trivial example used to demostrate the issue.

    In our production code we have a grid that uses the RadToobBar to house the CommandItem controls. These all have default tooltip text which is set in the markup for the ToolBar.

    We also have a RadToolTipMananger on the page as we want to use HTML in the tooltip text.

    In certain cases during the operation of the page, we need to change the tooltip text to provide additional information about the actions that will result when using the CommandItems on the grid as a consequence of the selections s/he has made. To do this we wanted to use set_toolTip() which, as you have confirmed, doesn't work and we are, therefore, forced to employ Veselin's workaround which, has the effect I was demonstrating in my example.

    I'm delighted that you have spoken to development about this. I'm sure that you'll agree that 3 years is a long time to leave something like this unaddressed.

    Is there a PITS item for this? If so, and if you would be so kind as to point me to it, I will go an offer it some support.

    --
    Stuart
  6. Answer
    Kate
    Admin
    Kate avatar
    1898 posts

    Posted 07 Nov 2012 Link to this post

    Hi Stuart,

    There is not a PITS issue that is created for the bug, but it is already scheduled for our next sprint and it will be fixed in the next few weeks. I will post a reply here, once the bug is fixed so you can download the hotfix and apply it instead of the current version of the Telerik controls that you are using.

    All the best,
    Kate
    the Telerik team
    If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
  7. Stuart Hemming
    Stuart Hemming avatar
    1622 posts
    Member since:
    Jul 2004

    Posted 07 Nov 2012 Link to this post

    Top Girl!

    --
    Stuart
  8. Ivan Zhekov
    Admin
    Ivan Zhekov avatar
    540 posts

    Posted 20 Nov 2012 Link to this post

    Hi, Stuart.

    The bug is fixed now and will make it in the next internal release (27 November) and in terms in the Service Pack.

    Regards,
    Ivan Zhekov
    the Telerik team
    If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
Back to Top
UI for ASP.NET Ajax is Ready for VS 2017