I am using the Q1-2009 radtreeview to create a databound menu tree with dynamically assigned contextmenus based on specifc node criteria.
I'm trying to use tooltip manager to create a tooltip panel when a particular context item is clicked and use it to load a specifc user control.
I've tried to attach a context menu item to the tooltip manager after it has been created using:
(working in VB)
Dim Contextmenu1 As New RadTreeViewContextMenu()
Contextmenu1.ID = "Contextmenu1"
Dim MenuItem1 As New RadMenuItem()
MenuItem1.Text = "Menu Item 1"
MenuItem1.Value = "menuitemvalue"
MenuItem1.ToolTip = "Menu Item 1 Tooltip"
Contextmenu1.Items.Add(menuitem1)
RadToolTipManager1.TargetControls.Add(menuitem1.clientID, "menuitemvalue", True)
But that does not seem to work. I've also tried adding the new target control after the contextmenu has been added to the tree node
as here:
node.ContextMenuID = "Contextmenu1"
Dim menu1 As Telerik.Web.UI.RadTreeViewContextMenu = New Telerik.Web.UI.RadTreeViewContextMenu
menu1 = CType(RadTreeView1.FindControl("Contextmenu1"), Telerik.Web.UI.RadTreeViewContextMenu)
menu1.Items(0).Text = menu1.Items(0).ClientID
RadToolTipManager1.TargetControls.Add(menu1.Items(0).ClientID, "menuitemvalue", True)
but this doesn't seem to work either.
I'm not sure if this is the wrong technique or if I'm just using it in the wrong way.
Any suggestions would be greatly appreciated.
Thanks
steve matheson