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

Setting ToolBar Button's ToolTip Client-side

6 Answers 141 Views
ToolBar
This is a migrated thread and some comments may be shown as answers.
Stuart Hemming
Top achievements
Rank 2
Stuart Hemming asked on 29 Oct 2012, 02:28 PM
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

6 Answers, 1 is accepted

Sort by
0
Stuart Hemming
Top achievements
Rank 2
answered on 29 Oct 2012, 02:48 PM
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

0
Kate
Telerik team
answered on 01 Nov 2012, 04:48 PM
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.
0
Stuart Hemming
Top achievements
Rank 2
answered on 02 Nov 2012, 08:09 AM
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
0
Accepted
Kate
Telerik team
answered on 07 Nov 2012, 09:54 AM
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.
0
Stuart Hemming
Top achievements
Rank 2
answered on 07 Nov 2012, 11:59 AM
Top Girl!

--
Stuart
0
Ivan Zhekov
Telerik team
answered on 20 Nov 2012, 05:34 PM
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.
Tags
ToolBar
Asked by
Stuart Hemming
Top achievements
Rank 2
Answers by
Stuart Hemming
Top achievements
Rank 2
Kate
Telerik team
Ivan Zhekov
Telerik team
Share this question
or