RadTreeNode
Definition
Namespace:Telerik.WinControls.UI
Assembly:Telerik.WinControls.UI.dll
Syntax:
public class RadTreeNode : IDataItem, ICloneable, INotifyPropertyChanged
Inheritance: objectRadTreeNode
Derived Classes:
Implements:
Constructors
public RadTreeNode()
public RadTreeNode(string text, RadTreeNode[] children)
Fields
protected int cachedIndex
protected const int IsAllowDropState = 64
protected const int IsCurrentState = 8
protected const int IsEnableState = 32
protected const int IsExpandedState = 2
protected const int IsSelectedState = 4
protected const int IsVisibleState = 16
protected BitVector32 state
protected const int SuspendNotificationsState = 1
protected const int UpdateParentSizeOnExpandedChangedState = 128
Properties
Gets or sets the measured desired width for this node.
[Browsable(false)]
public Size ActualSize { get; }
Gets or sets a value indicating whether [allow drop].
[Browsable(false)]
public bool AllowDrop { get; set; }
true if [allow drop]; otherwise, false.
Gets or sets the backcolor of the tree node. Color type represents an ARGB color.
public Color BackColor { get; set; }
Gets or sets the backcolor of the tree node. This property is applicable to radial, glass, office glass, gel, and vista gradients.
public Color BackColor2 { get; set; }
Gets or sets the backcolor of the tree node. This property is applicable to radial, glass, office glass, and vista gradients.
public Color BackColor3 { get; set; }
Gets or sets the backcolor of the tree node. This property is applicable to radial, glass, office glass, and vista gradients.
public Color BackColor4 { get; set; }
Gets or sets the border color of the tree node.
public Color BorderColor { get; set; }
Gets or sets a value indicating whether this RadTreeNode is checked.
public bool Checked { get; set; }
true if checked; otherwise, false.
Gets or sets the state of the check element.
public virtual ToggleState CheckState { get; set; }
The state of the check.
Gets or sets the type of the check element.
public CheckType CheckType { get; set; }
The type of the check.
Gets or sets the measured desired width for this node.
[Browsable(false)]
public Size ChildrenSize { get; }
Gets or sets the context menu associated to the node.
public virtual RadContextMenu ContextMenu { get; set; }
Returns an instance of RadDropDownMenu that is associated with the node. The default value is null.
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.
Gets or sets a value indicating whether this instance is current.
[Browsable(false)]
public bool Current { get; set; }
true if this instance is current; otherwise, false.
Gets the data-bound object that populated the node.
[Browsable(false)]
public object DataBoundItem { get; }
Gets or sets a value indicating whether the node can respond to user interaction.
public bool Enabled { get; set; }
The default value is true.
Gets or sets a value indicating whether this instance is expanded.
[Browsable(false)]
public bool Expanded { get; set; }
true if this instance is expanded; otherwise, false.
Gets the first node.
[Browsable(false)]
public RadTreeNode FirstNode { get; }
The first node.
Gets or sets the font of the node text.
public Font Font { get; set; }
The default value is null.
Gets or sets the foreground color of the tree node. This color is applied to the text label.
public virtual Color ForeColor { get; set; }
Gets the full path.
[Browsable(false)]
public string FullPath { get; }
The full path.
Gets or sets gradient angle for linear gradient.
public float GradientAngle { get; set; }
The default value is 90.0.
Gets or sets GradientPercentage for linear, glass, office glass, gel, vista, and radial gradients.
public float GradientPercentage { get; set; }
The default value is 0.5.
Gets or sets GradientPercentage for office glass, vista, and radial gradients.
public float GradientPercentage2 { get; set; }
The default value is 0.5.
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.
public GradientStyles GradientStyle { get; set; }
The default value is GradientStyles.
Gets a value indicating whether this instance has style.
[Browsable(false)]
public bool HasStyle { get; }
true if this instance has style; otherwise, false.
Gets or sets the image of the node.
[TypeConverter(typeof(ImageTypeConverter))]
public virtual Image Image { get; set; }
Gets or sets the left image list index value of the image displayed when the tree node is not selected.
[RelatedImageList("TreeView.ImageList")]
[TypeConverter("Telerik.WinControls.UI.Design.NoneExcludedImageIndexConverter, Telerik.WinControls.UI.Design, Version=2026.2.702.48, Culture=neutral, PublicKeyToken=5bb2a467cbec794e")]
public virtual int ImageIndex { get; set; }
Gets or sets the key for the left image associated with this tree node.
[RelatedImageList("TreeView.ImageList")]
[TypeConverter("Telerik.WinControls.UI.Design.RadImageKeyConverter, Telerik.WinControls.UI.Design, Version=2026.2.702.48, Culture=neutral, PublicKeyToken=5bb2a467cbec794e")]
public string ImageKey { get; set; }
Gets the index.
[Browsable(false)]
public virtual int Index { get; }
The index.
Gets a value indicating whether this instance is editing.
[Browsable(false)]
public bool IsEditing { get; }
true if this instance is editing; otherwise, false.
Gets or a value indicating whether the control is in design mode.
[Browsable(false)]
public bool IsInDesignMode { get; }
Gets or sets the height of the tree node in the tree view control.
[Browsable(true)]
public int ItemHeight { get; set; }
The default value is 20.
Gets the last node.
[Browsable(false)]
public RadTreeNode LastNode { get; }
The last node.
Matches
IEnumerator<RadTreeNode>
Gets the last matches using Find method.
[Browsable(false)]
public IEnumerator<RadTreeNode> Matches { get; }
Gets the last matches using Find method.
Gets or sets the name of the RadTreeNode.
[Browsable(true)]
public string Name { get; set; }
A String that represents the name of the tree node.
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 ("").
Gets the next node.
[Browsable(false)]
public RadTreeNode NextNode { get; }
The next node.
Gets the next visible node.
[Browsable(false)]
public RadTreeNode NextVisibleNode { get; }
The next visible node.
Gets the nodes.
[ListBindable(false)]
[Browsable(true)]
public RadTreeNodeCollection Nodes { get; }
The nodes.
Gets or sets the number of used colors in the gradient effect.
public int NumberOfColors { get; set; }
The default value is 4.
Gets or sets the parent.
[Browsable(false)]
public RadTreeNode Parent { get; }
The parent.
Gets the prev node.
[Browsable(false)]
public RadTreeNode PrevNode { get; }
The prev node.
Gets the prev visible node.
[Browsable(false)]
public RadTreeNode PrevVisibleNode { get; }
The prev visible node.
Gets the root parent node for this RadTreeView.
[Browsable(false)]
public RadTreeNode RootNode { get; }
The default value is null.
Gets or sets a value indicating whether this instance is selected.
[Browsable(false)]
public bool Selected { get; set; }
true if this instance is selected; otherwise, false.
Gets the style.
[Browsable(false)]
public TreeNodeStyle Style { get; }
The style.
Gets or sets the vector image of the node.
[TypeConverter(typeof(SvgImageTypeConverter))]
public virtual RadSvgImage SvgImage { get; set; }
Gets or sets the tag object that can be used to store user data, corresponding to the tree node.
[Bindable(true)]
[TypeConverter(typeof(StringConverter))]
public object Tag { get; set; }
The tag.
Gets or sets the text alignment.
public ContentAlignment TextAlignment { get; set; }
The default value is ContentAlignment.MiddleLeft.
Gets or sets the text that appears when the mouse pointer hovers over a tree node.
public string ToolTipText { get; set; }
The default value is "".
Gets the parent tree view that the tree node is assigned to.
[Browsable(false)]
public RadTreeView TreeView { get; }
Gets or sets the tree view element.
[Browsable(false)]
public RadTreeViewElement TreeViewElement { get; }
The tree view element.
Gets or sets the node value.
public virtual object Value { get; set; }
The text.
Methods
Initiates the editing of the tree node.
Cancels the edit.
Creates a new object that is a copy of the current instance.
Collapses the tree node.
public void Collapse()
Collapses the RadTreeNode and optionally collapses its children.
public void Collapse(bool ignoreChildren)
if set to true [ignore children].
Ensures that the tree node is visible, expanding tree nodes and scrolling the tree view control as necessary.
public void EnsureVisible()
Expands the tree node.
public void Expand()
Expands all the child tree nodes.
public void ExpandAll()
Finds the specified match.
public RadTreeNode Find(Predicate<RadTreeNode> match)
The match.
Returns:Finds the nodes.
public RadTreeNode[] FindNodes(Predicate<RadTreeNode> match)
The match.
Returns:Finds the nodes.
public RadTreeNode[] FindNodes<T>(FindAction<T> match, T arg)
The match.
argTThe argument.
Returns:Execute the action for every RadTreeNode in the branch
protected virtual void GetFullPath(StringBuilder path, string pathSeparator)
public void InvalidateOnState()
protected virtual void OnCheckStateChanged()
protected virtual void OnCheckStateChanged(CheckedMode checkedMode)
protected virtual void OnNotifyPropertyChanged(PropertyChangedEventArgs args)
Removes the current tree node from the tree view control.
public virtual void Remove()
Resumes property notifications after a previous SuspendPropertyNotifications() call.
public void ResumePropertyNotifications()
Sets the IBindingList which holds the child nodes in Object Relational Binding mode
protected virtual void SetBoundChildNodesList(IBindingList bindingList)
Allows PropertyChanged notifications to be temporary suspended.
public void SuspendPropertyNotifications()
Toggles the tree node to either the expanded or collapsed state.
public void Toggle()
protected virtual void UpdateChildrenCheckState()
protected virtual void UpdateParentCheckState()
Events
public event PropertyChangedEventHandler PropertyChanged
Implements: