Telerik blogs

I wrote this blog post together with our support officer Svetlina, who is in charge of answering tickets submitted for RadToolTip, RadSplitter and RadWindow. She has prepared a short list of tips and tricks based on some recurring questions that we have noticed over time. The original tips&tricks list had 12 entries, but some of the solutions were eventually built into the RadToolTip code, so it was reduced to 7 :)

We hope this post will be useful to all who try to combine the tooltip with other RadControls and use it in more advanced scenarios that are not always covered in our online demos. We will be following soon with tips & tricks sections for other popular controls such as RadWindow and RadEditor. Enjoy reading!

 

RadToolTip Tips &Tricks 

RadToolTip online demos page
RadToolTip overview page


1. Empty tooltip manager tooltipifies all elements on the page
The RadToolTipManager has a property called Autotooltipify. At present its default value is true. This means that if the RadToolTipManager’s TargetContorls collection is empty, the manager will automatically tooltipify all elements on the page that have their title(ToolTip) property set.

This property was not present in the original RadToolTipManager implementation and was added later due to many requests. We are considering to also change its default value from true to false, because patterns of RadToolTipManager usage show that the manager is commonly used to tooltipify only specific elements. You can find more information and an online demo about it here.
http://www.telerik.com/demos/aspnet/prometheus-futures/ToolTip/Examples/AutoTooltipify/DefaultCS.aspx

2. AJAX in tooltip only updates tooltip content area
The OnAjaxUpdate event of the RadToolTipManager initiates an AJAX request when the user moves the mouse over a particular 'tooltipified' element on the client. This allows for dynamically loading and displaying rich data content for a particular element on demand. By using it you can update only the content of the tooltips which tooltipify the controls declared in the RadToolTipManager’s TargetControls collection. This event cannot be used for updating other parts of the page (other update panels on it).

3. Differences between usage scenarios of RadToolTipManager and RadToolTip
RadToolTip and RadToolTipManager are similar in use and can deliver the same end result. Yet there are scenarios when one control can deliver the desired result with less developer effort. A demo which shows the differences in the RadToolTip and RadToolTipManager can be found here: http://www.telerik.com/DEMOS/ASPNET/Prometheus/ToolTip/Examples/ToolTipVersusToolTipManager/DefaultCS.aspx

4. HTML elements that cannot be tooltipified
There are some elements which cannot be tooltipified with a standard browser tooltip and respectively with RadToolTip because of their specific structure. For example, such elements are those, which have a <SELECT> html tags, because they include other elements which are not real HTML objects (examples are <asp:DropDownList>, <asp:ListBox>, etc). Other elements which are not good for tooltipifing are IFRAME, OBJECT, EMBED.
In conclusion we can say that if it is possible to configure an element to show a standard tooltip, it can be tooltipified with RadToolTip, too. Otherwise it is not possible.

5. RadControls for which RadTooltip TargetControlID cannot be directly bound
There are some RadControls for which the RadToolTip cannot be directly bound. When you use them you need to attach the tooltip to the control’s specific internal HTML element whose ID is different and made by adding a specific suffix. Such controls are RadComboBox, RadToolBar, RadTextBox and their corresponding suffixes are _Input, _button, _text.

You can find how to tooltipify an entire RadComboBox control or its items separately here:
http://www.telerik.com/support/kb/article/b454K-hmh-b454T-cmc-b454c-cmc.aspx

How to tooltipify a RadInput control - RadTextBox, RadNumericTextBox, RadMaskedTextBox, RadDateInput is demonstrated here:
http://www.telerik.com/support/kb/article/b454K-hmm-b454T-cmc-b454c-cmc.aspx

6. RequiredFieldValidator inside the RadToolTip
When you use a RequiredFieldValidator inside a RadToolTip you add the RequiredFieldValidator to the page, not only to the displayed in the tooltip part of it. After that, when you click any of your page’s elements which cause validation, those trigger the check of the validator, which fails even if the content of the tooltip is invisible. That is why, in such scenarios you have to set the CausesValidation property to false for all elements on the page that do not require it.

7. RadTooltip and RadGrid Classic - put the grid into an UpdatePanel and turn off the grid AJAX - it won’t work properly when using RadGrid's AJAX
When you use RadToolTipManager to tooltipify a Classic RadGrid the tooltips are not updated and disappear after an AJAX request made by the RadGrid by EnableAjax = true. This is due to RadGrid performing an internal AJAX request which slightly differs from the standard MS AJAX request. Because of this the RadToolTipManager is not “informed” about the update and doesn’t update the tooltips. In order to make the correct request you must put the RadGrid in an Update panel and to set its EnableAjax property to false.
The RadGrid for ASP.NET AJAX control can be used with Ajax enabled with RadToolTipManager without such problems because its implementation allows this.


About the Author

Iana Tsolova

is Product Manager at Telerik’s DevTools division. She joined the company back in the beginning of 2008 as a Support Officer and has since occupied various positions at Telerik, including Senior Support Officer, Team Lead at one of the ASP.NET AJAX teams and Technical Support Director. Iana’s main interests are web development, reading articles related to geography, wild nature and latest renewable energy technologies.

Comments

Comments are disabled in preview mode.