Some RadToolTip tips & tricks

Posted by: the telerik blogs, on 11 Jul 2008 | View original | Bookmarked: 0 time(s)

I wrote this blog post in cooperation 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 to7 :)

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

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.

2. AJAX in tooltip only updates tooltip content area

The OnAjaxUpdate eventof the RadToolTipManager initiates an AJAX requestwhenthe 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:

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:

How to tooltipify a RadInput control -RadTextBox,RadNumericTextBox,RadMaskedTextBox,RadDateInput is demonstrated here:

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 setthe CausesValidation property to false for all elements on the page that do not require it.

7. RadTooltipand 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.

Category: Ajax | Other Posts: View all posts by this blogger | Report as irrelevant | View bloggers stats | Views: 12153 | Hits: 32

Similar Posts

  • EF Tips & Tricks presentation tomorrow on OReillyNet more
  • DevConnections Spring 2009 Slides and Demos more
  • Why Three ScottCate Feeds more
  • Visual Basic at TechEd South Africa 2008 (Lisa Feigenbaum) more
  • Visual Studio Smart Tag Expansion Tip more
  • Come hear about VB 2008 Tips & Tricks at TechEd US! (Lisa Feigenbaum) more
  • Tip/Trick: Automating Dev, QA, Staging, and Production Web.Config Settings with VS 2005 more
  • ASP.NET 2.0 Tips and Tricks and ASP.NET, IIS7 and ASP.NET AJAX End to End Talks more
  • ASP.NET Tips and Tricks and LINQ Slides/Demos from CodeMash more
  • Troubleshooting DotNetNuke skins - 2 Videos more

News Categories

.NET | Agile | Ajax | Architecture | ASP.NET | BizTalk | C# | Certification | Data | DataGrid | DataSet | Debugger | DotNetNuke | Events | GridView | IIS | Indigo | JavaScript | Mobile | Mono | Patterns and Practices | Performance | Podcast | Refactor | Regex | Security | Sharepoint | Silverlight | Smart Client Applications | Software | SQL | VB.NET | Visual Studio | W3 | WCF | WinFx | WPF | WSE | XAML | XLinq | XML | XSD