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

HTML in Radmenu item tooltip?

2 Answers 81 Views
Menu
This is a migrated thread and some comments may be shown as answers.
David
Top achievements
Rank 1
David asked on 23 Jul 2012, 08:25 PM
Is this possible without javascript / radtooltipmanager? We would like to have things like "<strong>Tool Tip</strong> Text" display for items in a radmenu. The same text is loaded as a tooltip for text (links) to be highlighted in a literal on the page, and is tooltipified using a RadToolTipManager. In the main text, the HTML display is fine for the tooltip, but in the menu item, it all displays as plain text. The tooltipmanager has no Target Controls, just trying to have everything on the page present the same way but the menu items don't seem to be picked up.

Menu item text and tool tip text are both loaded from a SQL data source depending on other page selections, not hard coded into the radmenu control. It appears a blank tool tip is trying to come from the tooltipmanager on each radmenu item, but the non-tooltipified tool tip pops up with no skin formatting.

I have also tried a separate RadToolTip control just for the RadMenu control but no luck. Is there a TargetControlID such as MyMenu_Items that I should be using?

Thanks
Dave

2 Answers, 1 is accepted

Sort by
0
Peter
Telerik team
answered on 26 Jul 2012, 08:48 AM
Hello Dave,

Here is one possible solution:
<telerik:RadToolTipManager ID="RadToolTipManager1" runat="server" AutoTooltipify="true">
   </telerik:RadToolTipManager>
   <telerik:RadMenu ID="RadMenu1" runat="server">
       <Items>
           <telerik:RadMenuItem runat="server" Text="Root RadMenuItem1" ToolTip="Root RadMenuItem1">
               <Items>
                   <telerik:RadMenuItem runat="server" Text="Child RadMenuItem 1" ToolTip="Child RadMenuItem 1">
                   </telerik:RadMenuItem>
                   <telerik:RadMenuItem runat="server" Text="Child RadMenuItem 2" ToolTip="Child RadMenuItem 2">
                   </telerik:RadMenuItem>
               </Items>
           </telerik:RadMenuItem>
           <telerik:RadMenuItem runat="server" Text="Root RadMenuItem2" ToolTip="Root RadMenuItem2">
               <Items>
                   <telerik:RadMenuItem runat="server" Text="Child RadMenuItem 1" ToolTip="Child RadMenuItem 1">
                   </telerik:RadMenuItem>
                   <telerik:RadMenuItem runat="server" Text="Child RadMenuItem 2" ToolTip="Child RadMenuItem 2">
                   </telerik:RadMenuItem>
               </Items>
           </telerik:RadMenuItem>
           <telerik:RadMenuItem runat="server" Text="Root RadMenuItem3" ToolTip="Root RadMenuItem3">
           </telerik:RadMenuItem>
       </Items>
   </telerik:RadMenu>

code-behind:
//If your RadMenu is databound, you can handle ItemDataBound to do the same:
   protected void Page_Load(object sender, EventArgs e)
   {
       foreach (RadMenuItem item in RadMenu1.GetAllItems())
       {
           item.ToolTip = "<strong>" + item.ToolTip + "</strong>";
       }
   }


Greetings,
Peter
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
David
Top achievements
Rank 1
answered on 26 Jul 2012, 12:46 PM
Thanks. Not quite what I was looking for but when is it ever the case that answers align perfectly with expectations?  :)
Tags
Menu
Asked by
David
Top achievements
Rank 1
Answers by
Peter
Telerik team
David
Top achievements
Rank 1
Share this question
or