ClassRadTreeNode
Definition
Namespace:Telerik.WinControls.UI
Assembly:Telerik.WinControls.UI.dll
Syntax:
public class RadTreeNode : IDataItem, ICloneable, INotifyPropertyChanged
Inheritance: objectRadTreeNode
Derived Classes:
Implements:
Constructors
RadTreeNode()
Declaration
public RadTreeNode()
RadTreeNode(string, RadTreeNode[])
Declaration
public RadTreeNode(string text, RadTreeNode[] children)
Parameters
text
children
RadTreeNode(string, bool)
Initializes new instance of the RadTreeNode class.
Fields
UpdateParentSizeOnExpandedChangedState
Declaration
protected const int UpdateParentSizeOnExpandedChangedState = 128
Field Value
Properties
ActualSize
Gets or sets the measured desired width for this node.
Declaration
[Browsable(false)]
public Size ActualSize { get; }
Property Value
AllowDrop
Gets or sets a value indicating whether [allow drop].
Declaration
[Browsable(false)]
public bool AllowDrop { get; set; }
Property Value
true if [allow drop]; otherwise, false.
BackColor
Gets or sets the backcolor of the tree node. Color type represents an ARGB color.
BackColor2
Gets or sets the backcolor of the tree node. This property is applicable to radial, glass, office glass, gel, and vista gradients.
BackColor3
Gets or sets the backcolor of the tree node. This property is applicable to radial, glass, office glass, and vista gradients.
BackColor4
Gets or sets the backcolor of the tree node. This property is applicable to radial, glass, office glass, and vista gradients.
BorderColor
Gets or sets the border color of the tree node.
CheckState
Gets or sets the state of the check element.
Declaration
public virtual ToggleState CheckState { get; set; }
Property Value
The state of the check.
CheckType
Gets or sets the type of the check element.
Declaration
public CheckType CheckType { get; set; }
Property Value
The type of the check.
Checked
Gets or sets a value indicating whether this RadTreeNode is checked.
Declaration
public bool Checked { get; set; }
Property Value
true if checked; otherwise, false.
ChildrenSize
Gets or sets the measured desired width for this node.
Declaration
[Browsable(false)]
public Size ChildrenSize { get; }
Property Value
ContextMenu
Gets or sets the context menu associated to the node.
Declaration
public virtual RadContextMenu ContextMenu { get; set; }
Property Value
Returns an instance of RadDropDownMenu that is associated with the node. The default value is null.
Remarks
This property could be used to associate a custom menu and replace the treeview's default. If the context menu is invoked by right-clicking a node, the treeview's menu will not be shown and the context menu assigned to this node will be shown instead.
Current
Gets or sets a value indicating whether this instance is current.
Declaration
[Browsable(false)]
public bool Current { get; set; }
Property Value
true if this instance is current; otherwise, false.
DataBoundItem
Gets the data-bound object that populated the node.
Declaration
[Browsable(false)]
public object DataBoundItem { get; }
Property Value
Enabled
Gets or sets a value indicating whether the node can respond to user interaction.
Declaration
public bool Enabled { get; set; }
Property Value
The default value is true.
Expanded
Gets or sets a value indicating whether this instance is expanded.
Declaration
[Browsable(false)]
public bool Expanded { get; set; }
Property Value
true if this instance is expanded; otherwise, false.
FirstNode
Gets the first node.
Declaration
[Browsable(false)]
public RadTreeNode FirstNode { get; }
Property Value
The first node.
Font
Gets or sets the font of the node text.
Declaration
public Font Font { get; set; }
Property Value
The default value is null.
ForeColor
Gets or sets the foreground color of the tree node. This color is applied to the text label.
FullPath
Gets the full path.
Declaration
[Browsable(false)]
public string FullPath { get; }
Property Value
The full path.
GradientAngle
Gets or sets gradient angle for linear gradient.
Declaration
public float GradientAngle { get; set; }
Property Value
The default value is 90.0.
GradientPercentage
Gets or sets GradientPercentage for linear, glass, office glass, gel, vista, and radial gradients.
Declaration
public float GradientPercentage { get; set; }
Property Value
The default value is 0.5.
GradientPercentage2
Gets or sets GradientPercentage for office glass, vista, and radial gradients.
Declaration
public float GradientPercentage2 { get; set; }
Property Value
The default value is 0.5.
GradientStyle
Gets and sets the gradient style. The possible values are defined in the gradient style enumeration: solid, linear, radial, glass, office glass, gel, and vista.
Declaration
public GradientStyles GradientStyle { get; set; }
Property Value
The default value is GradientStyles.
HasStyle
Gets a value indicating whether this instance has style.
Declaration
[Browsable(false)]
public bool HasStyle { get; }
Property Value
true if this instance has style; otherwise, false.
Image
Gets or sets the image of the node.
Declaration
[TypeConverter(typeof(ImageTypeConverter))]
public virtual Image Image { get; set; }
Property Value
ImageIndex
Gets or sets the left image list index value of the image displayed when the tree node is not selected.
Declaration
[RelatedImageList("TreeView.ImageList")]
[TypeConverter("Telerik.WinControls.UI.Design.NoneExcludedImageIndexConverter, Telerik.WinControls.UI.Design, Version=2026.1.217.48, Culture=neutral, PublicKeyToken=5bb2a467cbec794e")]
public virtual int ImageIndex { get; set; }
Property Value
ImageKey
Gets or sets the key for the left image associated with this tree node.
Declaration
[RelatedImageList("TreeView.ImageList")]
[TypeConverter("Telerik.WinControls.UI.Design.RadImageKeyConverter, Telerik.WinControls.UI.Design, Version=2026.1.217.48, Culture=neutral, PublicKeyToken=5bb2a467cbec794e")]
public string ImageKey { get; set; }
Property Value
Index
Gets the index.
Declaration
[Browsable(false)]
public virtual int Index { get; }
Property Value
The index.
IsEditing
Gets a value indicating whether this instance is editing.
Declaration
[Browsable(false)]
public bool IsEditing { get; }
Property Value
true if this instance is editing; otherwise, false.
IsInDesignMode
Gets or a value indicating whether the control is in design mode.
Declaration
[Browsable(false)]
public bool IsInDesignMode { get; }
Property Value
ItemHeight
Gets or sets the height of the tree node in the tree view control.
Declaration
[Browsable(true)]
public int ItemHeight { get; set; }
Property Value
The default value is 20.
LastNode
Gets the last node.
Declaration
[Browsable(false)]
public RadTreeNode LastNode { get; }
Property Value
The last node.
Level
Gets the level.
Declaration
[Browsable(false)]
public int Level { get; }
Property Value
The level.
Matches
Gets the last matches using Find method.
Declaration
[Browsable(false)]
public IEnumerator<RadTreeNode> Matches { get; }
Property Value
IEnumerator<RadTreeNode>
Gets the last matches using Find method.
Name
Gets or sets the name of the RadTreeNode.
Declaration
[Browsable(true)]
public string Name { get; set; }
Property Value
A String that represents the name of the tree node.
Remarks
The Name of a TreeNode is also the node's key, when the node is part of a RadTreeNodeCollection. If the node does not have a name, Name returns an empty string ("").
NextNode
Gets the next node.
Declaration
[Browsable(false)]
public RadTreeNode NextNode { get; }
Property Value
The next node.
NextVisibleNode
Gets the next visible node.
Declaration
[Browsable(false)]
public RadTreeNode NextVisibleNode { get; }
Property Value
The next visible node.
Nodes
Gets the nodes.
Declaration
[ListBindable(false)]
[Browsable(true)]
public RadTreeNodeCollection Nodes { get; }
Property Value
The nodes.
NumberOfColors
Gets or sets the number of used colors in the gradient effect.
Declaration
public int NumberOfColors { get; set; }
Property Value
The default value is 4.
Parent
Gets or sets the parent.
Declaration
[Browsable(false)]
public RadTreeNode Parent { get; }
Property Value
The parent.
PrevNode
Gets the prev node.
Declaration
[Browsable(false)]
public RadTreeNode PrevNode { get; }
Property Value
The prev node.
PrevVisibleNode
Gets the prev visible node.
Declaration
[Browsable(false)]
public RadTreeNode PrevVisibleNode { get; }
Property Value
The prev visible node.
RootNode
Gets the root parent node for this RadTreeView.
Declaration
[Browsable(false)]
public RadTreeNode RootNode { get; }
Property Value
The default value is null.
Selected
Gets or sets a value indicating whether this instance is selected.
Declaration
[Browsable(false)]
public bool Selected { get; set; }
Property Value
true if this instance is selected; otherwise, false.
Style
Gets the style.
Declaration
[Browsable(false)]
public TreeNodeStyle Style { get; }
Property Value
The style.
SvgImage
Gets or sets the vector image of the node.
Declaration
[TypeConverter(typeof(SvgImageTypeConverter))]
public virtual RadSvgImage SvgImage { get; set; }
Property Value
Tag
Gets or sets the tag object that can be used to store user data, corresponding to the tree node.
Declaration
[Bindable(true)]
[TypeConverter(typeof(StringConverter))]
public object Tag { get; set; }
Property Value
The tag.
Text
Gets or sets the text.
TextAlignment
Gets or sets the text alignment.
Declaration
public ContentAlignment TextAlignment { get; set; }
Property Value
The default value is ContentAlignment.MiddleLeft.
ToolTipText
Gets or sets the text that appears when the mouse pointer hovers over a tree node.
Declaration
public string ToolTipText { get; set; }
Property Value
The default value is "".
TreeView
Gets the parent tree view that the tree node is assigned to.
Declaration
[Browsable(false)]
public RadTreeView TreeView { get; }
Property Value
TreeViewElement
Gets or sets the tree view element.
Declaration
[Browsable(false)]
public RadTreeViewElement TreeViewElement { get; }
Property Value
The tree view element.
Value
Gets or sets the node value.
Declaration
public virtual object Value { get; set; }
Property Value
The text.
Methods
BeginEdit()
Initiates the editing of the tree node.
CacheLastFind(List<RadTreeNode>)
Declaration
protected void CacheLastFind(List<RadTreeNode> nodes)
Parameters
nodes
List<RadTreeNode>
Clone()
Creates a new object that is a copy of the current instance.
Declaration
public object Clone()
Returns
A new object that is a copy of this instance.
Implements
Collapse(bool)
Collapses the RadTreeNode and optionally collapses its children.
Declaration
public void Collapse(bool ignoreChildren)
Parameters
ignoreChildren
if set to true [ignore children].
EnsureVisible()
Ensures that the tree node is visible, expanding tree nodes and scrolling the tree view control as necessary.
Declaration
public void EnsureVisible()
Execute(ICommand, params object[])
Executes the specified command.
Execute(bool, ICommand, params object[])
Executes the specified command include sub trees.
Find(Predicate<RadTreeNode>)
Finds the specified match.
Declaration
public RadTreeNode Find(Predicate<RadTreeNode> match)
Parameters
match
The match.
Returns
Find<T>(FindAction<T>, T)
Declaration
public RadTreeNode Find<T>(FindAction<T> match, T arg)
Parameters
match
FindAction<T>
arg
T
Returns
FindNodes(Predicate<RadTreeNode>)
Finds the nodes.
Declaration
public RadTreeNode[] FindNodes(Predicate<RadTreeNode> match)
Parameters
match
The match.
Returns
FindNodes<T>(FindAction<T>, T)
Finds the nodes.
Declaration
public RadTreeNode[] FindNodes<T>(FindAction<T> match, T arg)
Parameters
match
FindAction<T>
The match.
arg
T
The argument.
Returns
ForEach(Action<RadTreeNode>)
Execute the action for every RadTreeNode in the branch
Declaration
public void ForEach(Action<RadTreeNode> action)
Parameters
action
GetFullPath(StringBuilder, string)
Declaration
protected virtual void GetFullPath(StringBuilder path, string pathSeparator)
Parameters
path
pathSeparator
GetNodeCount(bool)
Returns the number of child tree nodes.
InvalidateOnState()
Declaration
public void InvalidateOnState()
InvalidateOnState(bool)
Declaration
public void InvalidateOnState(bool recursive)
Parameters
recursive
NotifyExpandedChanged(RadTreeNode)
Declaration
protected virtual void NotifyExpandedChanged(RadTreeNode node)
Parameters
node
OnCheckStateChanged()
Declaration
protected virtual void OnCheckStateChanged()
OnCheckStateChanged(CheckedMode)
Declaration
protected virtual void OnCheckStateChanged(CheckedMode checkedMode)
Parameters
checkedMode
OnNotifyPropertyChanged(PropertyChangedEventArgs)
Declaration
protected virtual void OnNotifyPropertyChanged(PropertyChangedEventArgs args)
Parameters
args
OnNotifyPropertyChanged(string)
Declaration
protected virtual void OnNotifyPropertyChanged(string name)
Parameters
name
Remove()
Removes the current tree node from the tree view control.
Declaration
public virtual void Remove()
ResumePropertyNotifications()
Resumes property notifications after a previous SuspendPropertyNotifications() call.
Declaration
public void ResumePropertyNotifications()
SetBoundChildNodesList(IBindingList)
Sets the IBindingList which holds the child nodes in Object Relational Binding mode
Declaration
protected virtual void SetBoundChildNodesList(IBindingList bindingList)
Parameters
bindingList
SetCheckStateCore(ToggleState)
Declaration
protected virtual bool SetCheckStateCore(ToggleState value)
Parameters
value
Returns
SuspendPropertyNotifications()
Allows PropertyChanged notifications to be temporary suspended.
Declaration
public void SuspendPropertyNotifications()
ToString()
Returns a string that represents the tree node.
Toggle()
Toggles the tree node to either the expanded or collapsed state.
Declaration
public void Toggle()
UpdateChildrenCheckState()
Declaration
protected virtual void UpdateChildrenCheckState()
UpdateParentCheckState()
Declaration
protected virtual void UpdateParentCheckState()
Events
PropertyChanged
Declaration
public event PropertyChangedEventHandler PropertyChanged
Event Value
Implements