Hello!
I am using Telerik version: 2009.3.1208.0
My task is to add an arrow to the node (on the right side of the node) so people can left-click on it and access context menu. See picture attached.
I was able to to do that through creating a nodetemplate (subscribing to an interface) and then assigning my class to NodeTemplate property (on Page Init)
Here is the code:
Everything seems fine EXCEPT:
When expanding one of the nodes, the NodeExpand Event sends the wrong value for the node that is being expanded. For example, if I expand Node 3, it gives me value (e.Node.Value) for Node 1. See attached picture for more explanation. As a result wrong child nodes are loaded.
Questions:
1) Why NodeExpand is broken when NodeTemplate is being added ?
2) Any way to achieve adding an arrow to the node so people can left-click on it without overwriting NodeTemplate?
I am using Telerik version: 2009.3.1208.0
My task is to add an arrow to the node (on the right side of the node) so people can left-click on it and access context menu. See picture attached.
I was able to to do that through creating a nodetemplate (subscribing to an interface) and then assigning my class to NodeTemplate property (on Page Init)
Here is the code:
Imports System.Web.UIImports System.Web.UI.WebControlsImports Telerik.Web.UI Public Class MyNodeTemplate Implements ITemplate Public Sub InstantiateIn(ByVal container As Control) Implements ITemplate.InstantiateIn Dim newLabel As New Label() newLabel.CssClass = "nodeLabel" newLabel.Text = DirectCast(container, RadTreeNode).Text Dim arrowDiv As New System.Web.UI.HtmlControls.HtmlGenericControl("DIV") arrowDiv.Attributes.Add("class", "nodeRightClickArrow") arrowDiv.Attributes.Add("onclick", "LeftClickContextMenuClick(event, this);") container.Controls.Add(newLabel) container.Controls.Add(arrowDiv) End Sub End ClassEverything seems fine EXCEPT:
When expanding one of the nodes, the NodeExpand Event sends the wrong value for the node that is being expanded. For example, if I expand Node 3, it gives me value (e.Node.Value) for Node 1. See attached picture for more explanation. As a result wrong child nodes are loaded.
Questions:
1) Why NodeExpand is broken when NodeTemplate is being added ?
2) Any way to achieve adding an arrow to the node so people can left-click on it without overwriting NodeTemplate?
