Class RadTreeNode
Inheritance
Inherited Members
Namespace: Telerik.WinControls.UI
Assembly: Telerik.WinControls.UI.dll
Syntax
public class RadTreeNode : IDataItem, ICloneable, INotifyPropertyChanged
Constructors
RadTreeNode()
Declaration
public RadTreeNode()
RadTreeNode(String)
Declaration
public RadTreeNode(string text)
Parameters
System.String
text
|
RadTreeNode(String, Boolean)
Initializes new instance of the RadTreeNode class.
Declaration
public RadTreeNode(string text, bool expanded)
Parameters
System.String
text
The text to be used as label text. |
System.Boolean
expanded
A boolean value indicating whether the node is expanded. |
RadTreeNode(String, Image)
Declaration
public RadTreeNode(string text, Image image)
Parameters
System.String
text
|
System.Drawing.Image
image
|
RadTreeNode(String, Image, Boolean)
Declaration
public RadTreeNode(string text, Image image, bool expanded)
Parameters
System.String
text
|
System.Drawing.Image
image
|
System.Boolean
expanded
|
RadTreeNode(String, RadTreeNode[])
Declaration
public RadTreeNode(string text, RadTreeNode[] children)
Parameters
System.String
text
|
RadTreeNode[]
children
|
Fields
cachedIndex
Declaration
protected int cachedIndex
Field Value
System.Int32
|
IsAllowDropState
Declaration
protected const int IsAllowDropState = 64
Field Value
System.Int32
|
IsCurrentState
Declaration
protected const int IsCurrentState = 8
Field Value
System.Int32
|
IsEnableState
Declaration
protected const int IsEnableState = 32
Field Value
System.Int32
|
IsExpandedState
Declaration
protected const int IsExpandedState = 2
Field Value
System.Int32
|
IsSelectedState
Declaration
protected const int IsSelectedState = 4
Field Value
System.Int32
|
IsVisibleState
Declaration
protected const int IsVisibleState = 16
Field Value
System.Int32
|
state
Declaration
protected BitVector32 state
Field Value
System.Collections.Specialized.BitVector32
|
SuspendNotificationsState
Declaration
protected const int SuspendNotificationsState = 1
Field Value
System.Int32
|
UpdateParentSizeOnExpandedChangedState
Declaration
protected const int UpdateParentSizeOnExpandedChangedState = 128
Field Value
System.Int32
|
Properties
ActualSize
Gets or sets the measured desired width for this node.
Declaration
public Size ActualSize { get; }
Property Value
System.Drawing.Size
|
AllowDrop
Gets or sets a value indicating whether [allow drop].
Declaration
public bool AllowDrop { get; set; }
Property Value
System.Boolean
|
BackColor
Gets or sets the backcolor of the tree node. Color type represents an ARGB color.
Declaration
public Color BackColor { get; set; }
Property Value
System.Drawing.Color
|
See Also
BackColor2
Gets or sets the backcolor of the tree node. This property is applicable to radial, glass, office glass, gel, and vista gradients.
Declaration
public Color BackColor2 { get; set; }
Property Value
System.Drawing.Color
|
See Also
BackColor3
Gets or sets the backcolor of the tree node. This property is applicable to radial, glass, office glass, and vista gradients.
Declaration
public Color BackColor3 { get; set; }
Property Value
System.Drawing.Color
|
See Also
BackColor4
Gets or sets the backcolor of the tree node. This property is applicable to radial, glass, office glass, and vista gradients.
Declaration
public Color BackColor4 { get; set; }
Property Value
System.Drawing.Color
|
See Also
BorderColor
Gets or sets the border color of the tree node.
Declaration
public Color BorderColor { get; set; }
Property Value
System.Drawing.Color
|
Checked
Gets or sets a value indicating whether this RadTreeNode is checked.
Declaration
public bool Checked { get; set; }
Property Value
System.Boolean
|
CheckState
Gets or sets the state of the check element.
Declaration
public virtual ToggleState CheckState { get; set; }
Property Value
ToggleState
The state of the check. |
CheckType
Gets or sets the type of the check element.
Declaration
public CheckType CheckType { get; set; }
Property Value
CheckType
The type of the check. |
ChildrenSize
Gets or sets the measured desired width for this node.
Declaration
public Size ChildrenSize { get; }
Property Value
System.Drawing.Size
|
ContextMenu
Gets or sets the context menu associated to the node.
Declaration
public virtual RadContextMenu ContextMenu { get; set; }
Property Value
RadContextMenu
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.
See Also
Current
Gets or sets a value indicating whether this instance is current.
Declaration
public bool Current { get; set; }
Property Value
System.Boolean
|
DataBoundItem
Gets the data-bound object that populated the node.
Declaration
public object DataBoundItem { get; }
Property Value
System.Object
|
Enabled
Gets or sets a value indicating whether the node can respond to user interaction.
Declaration
public bool Enabled { get; set; }
Property Value
System.Boolean
The default value is true. |
Expanded
Gets or sets a value indicating whether this instance is expanded.
Declaration
public bool Expanded { get; set; }
Property Value
System.Boolean
|
FirstNode
Gets the first node.
Declaration
public RadTreeNode FirstNode { get; }
Property Value
RadTreeNode
The first node. |
Font
Gets or sets the font of the node text.
Declaration
public Font Font { get; set; }
Property Value
System.Drawing.Font
The default value is null. |
ForeColor
Gets or sets the foreground color of the tree node. This color is applied to the text label.
Declaration
public virtual Color ForeColor { get; set; }
Property Value
System.Drawing.Color
|
FullPath
Gets the full path.
Declaration
public string FullPath { get; }
Property Value
System.String
The full path. |
GradientAngle
Gets or sets gradient angle for linear gradient.
Declaration
public float GradientAngle { get; set; }
Property Value
System.Single
The default value is 90.0. |
See Also
GradientPercentage
Gets or sets GradientPercentage for linear, glass, office glass, gel, vista, and radial gradients.
Declaration
public float GradientPercentage { get; set; }
Property Value
System.Single
The default value is 0.5. |
See Also
GradientPercentage2
Gets or sets GradientPercentage for office glass, vista, and radial gradients.
Declaration
public float GradientPercentage2 { get; set; }
Property Value
System.Single
The default value is 0.5. |
See Also
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
GradientStyles
The default value is GradientStyles. |
See Also
HasStyle
Gets a value indicating whether this instance has style.
Declaration
public bool HasStyle { get; }
Property Value
System.Boolean
|
Image
Gets or sets the image of the node.
Declaration
public virtual Image Image { get; set; }
Property Value
System.Drawing.Image
|
See Also
ImageIndex
Gets or sets the left image list index value of the image displayed when the tree node is not selected.
Declaration
public virtual int ImageIndex { get; set; }
Property Value
System.Int32
|
See Also
ImageKey
Gets or sets the key for the left image associated with this tree node.
Declaration
public string ImageKey { get; set; }
Property Value
System.String
|
See Also
Index
Gets the index.
Declaration
public virtual int Index { get; }
Property Value
System.Int32
The index. |
IsEditing
Gets a value indicating whether this instance is editing.
Declaration
public bool IsEditing { get; }
Property Value
System.Boolean
|
IsInDesignMode
Gets or a value indicating whether the control is in design mode.
Declaration
public bool IsInDesignMode { get; }
Property Value
System.Boolean
|
ItemHeight
Gets or sets the height of the tree node in the tree view control.
Declaration
public int ItemHeight { get; set; }
Property Value
System.Int32
The default value is 20. |
LastNode
Gets the last node.
Declaration
public RadTreeNode LastNode { get; }
Property Value
RadTreeNode
The last node. |
Level
Gets the level.
Declaration
public int Level { get; }
Property Value
System.Int32
The level. |
Matches
Gets the last matches using Find method.
Declaration
public IEnumerator<RadTreeNode> Matches { get; }
Property Value
System.Collections.Generic.IEnumerator<RadTreeNode>
Gets the last matches using Find method. |
Name
Gets or sets the name of the RadTreeNode.
Declaration
public string Name { get; set; }
Property Value
System.String
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
public RadTreeNode NextNode { get; }
Property Value
RadTreeNode
The next node. |
NextVisibleNode
Gets the next visible node.
Declaration
public RadTreeNode NextVisibleNode { get; }
Property Value
RadTreeNode
The next visible node. |
Nodes
Gets the nodes.
Declaration
public RadTreeNodeCollection Nodes { get; }
Property Value
RadTreeNodeCollection
The nodes. |
NumberOfColors
Gets or sets the number of used colors in the gradient effect.
Declaration
public int NumberOfColors { get; set; }
Property Value
System.Int32
The default value is 4. |
See Also
Parent
Gets or sets the parent.
Declaration
public RadTreeNode Parent { get; }
Property Value
RadTreeNode
The parent. |
PrevNode
Gets the prev node.
Declaration
public RadTreeNode PrevNode { get; }
Property Value
RadTreeNode
The prev node. |
PrevVisibleNode
Gets the prev visible node.
Declaration
public RadTreeNode PrevVisibleNode { get; }
Property Value
RadTreeNode
The prev visible node. |
RootNode
Gets the root parent node for this RadTreeView.
Declaration
public RadTreeNode RootNode { get; }
Property Value
RadTreeNode
The default value is null. |
Selected
Gets or sets a value indicating whether this instance is selected.
Declaration
public bool Selected { get; set; }
Property Value
System.Boolean
|
Style
Gets the style.
Declaration
public TreeNodeStyle Style { get; }
Property Value
TreeNodeStyle
The style. |
SvgImage
Gets or sets the vector image of the node.
Declaration
public virtual RadSvgImage SvgImage { get; set; }
Property Value
RadSvgImage
|
Tag
Gets or sets the tag object that can be used to store user data, corresponding to the tree node.
Declaration
public object Tag { get; set; }
Property Value
System.Object
The tag. |
Text
Gets or sets the text.
Declaration
public string Text { get; set; }
Property Value
System.String
The text. |
TextAlignment
Gets or sets the text alignment.
Declaration
public ContentAlignment TextAlignment { get; set; }
Property Value
System.Drawing.ContentAlignment
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
System.String
The default value is "". |
TreeView
Gets the parent tree view that the tree node is assigned to.
Declaration
public RadTreeView TreeView { get; }
Property Value
RadTreeView
|
TreeViewElement
Gets or sets the tree view element.
Declaration
public RadTreeViewElement TreeViewElement { get; }
Property Value
RadTreeViewElement
The tree view element. |
Value
Gets or sets the node value.
Declaration
public virtual object Value { get; set; }
Property Value
System.Object
The text. |
Visible
Gets or sets a value indicating whether this instance is visible.
Declaration
public virtual bool Visible { get; set; }
Property Value
System.Boolean
|
Methods
BeginEdit()
Initiates the editing of the tree node.
Declaration
public bool BeginEdit()
Returns
System.Boolean
|
CacheLastFind(List<RadTreeNode>)
Declaration
protected void CacheLastFind(List<RadTreeNode> nodes)
Parameters
System.Collections.Generic.List<RadTreeNode>
nodes
|
CancelEdit()
Cancels the edit.
Declaration
public bool CancelEdit()
Returns
System.Boolean
|
Clone()
Creates a new object that is a copy of the current instance.
Declaration
public object Clone()
Returns
System.Object
A new object that is a copy of this instance. |
Implements
Collapse()
Collapses the tree node.
Declaration
public void Collapse()
Collapse(Boolean)
Collapses the RadTreeNode and optionally collapses its children.
Declaration
public void Collapse(bool ignoreChildren)
Parameters
System.Boolean
ignoreChildren
if set to |
EndEdit()
Ends the edit.
Declaration
public bool EndEdit()
Returns
System.Boolean
|
EnsureVisible()
Ensures that the tree node is visible, expanding tree nodes and scrolling the tree view control as necessary.
Declaration
public void EnsureVisible()
Execute(Boolean, ICommand, Object[])
Executes the specified command include sub trees.
Declaration
public object Execute(bool includeSubTrees, ICommand command, params object[] settings)
Parameters
System.Boolean
includeSubTrees
if set to |
ICommand
command
The command. |
System.Object[]
settings
The settings. |
Returns
System.Object
|
Execute(ICommand, Object[])
Executes the specified command.
Declaration
public object Execute(ICommand command, params object[] settings)
Parameters
ICommand
command
The command. |
System.Object[]
settings
The settings. |
Returns
System.Object
|
Expand()
Expands the tree node.
Declaration
public void Expand()
ExpandAll()
Expands all the child tree nodes.
Declaration
public void ExpandAll()
Find(Predicate<RadTreeNode>)
Finds the specified match.
Declaration
public RadTreeNode Find(Predicate<RadTreeNode> match)
Parameters
System.Predicate<RadTreeNode>
match
The match. |
Returns
RadTreeNode
|
Find<T>(FindAction<T>, T)
Declaration
public RadTreeNode Find<T>(FindAction<T> match, T arg)
Parameters
FindAction<T>
match
|
T
arg
|
Returns
RadTreeNode
|
Type Parameters
T
|
FindNodes(Predicate<RadTreeNode>)
Finds the nodes.
Declaration
public RadTreeNode[] FindNodes(Predicate<RadTreeNode> match)
Parameters
System.Predicate<RadTreeNode>
match
The match. |
Returns
RadTreeNode[]
|
FindNodes<T>(FindAction<T>, T)
Finds the nodes.
Declaration
public RadTreeNode[] FindNodes<T>(FindAction<T> match, T arg)
Parameters
FindAction<T>
match
The match. |
T
arg
The argument. |
Returns
RadTreeNode[]
|
Type Parameters
T
|
ForEach(Action<RadTreeNode>)
Execute the action for every RadTreeNode in the branch
Declaration
public void ForEach(Action<RadTreeNode> action)
Parameters
System.Action<RadTreeNode>
action
|
GetFullPath(StringBuilder, String)
Declaration
protected virtual void GetFullPath(StringBuilder path, string pathSeparator)
Parameters
System.Text.StringBuilder
path
|
System.String
pathSeparator
|
GetNodeCount(Boolean)
Returns the number of child tree nodes.
Declaration
public int GetNodeCount(bool includeSubTrees)
Parameters
System.Boolean
includeSubTrees
if set to |
Returns
System.Int32
|
InvalidateOnState()
Declaration
public void InvalidateOnState()
InvalidateOnState(Boolean)
Declaration
public void InvalidateOnState(bool recursive)
Parameters
System.Boolean
recursive
|
NotifyExpandedChanged(RadTreeNode)
Declaration
protected virtual void NotifyExpandedChanged(RadTreeNode node)
Parameters
RadTreeNode
node
|
OnCheckStateChanged()
Declaration
protected virtual void OnCheckStateChanged()
OnCheckStateChanged(CheckedMode)
Declaration
protected virtual void OnCheckStateChanged(CheckedMode checkedMode)
Parameters
CheckedMode
checkedMode
|
OnDataBoundItemChanged(Object, Object)
Declaration
protected virtual void OnDataBoundItemChanged(object oldItem, object newItem)
Parameters
System.Object
oldItem
|
System.Object
newItem
|
OnNotifyPropertyChanged(PropertyChangedEventArgs)
Declaration
protected virtual void OnNotifyPropertyChanged(PropertyChangedEventArgs args)
Parameters
System.ComponentModel.PropertyChangedEventArgs
args
|
OnNotifyPropertyChanged(String)
Declaration
protected virtual void OnNotifyPropertyChanged(string name)
Parameters
System.String
name
|
Remove()
Removes the current tree node from the tree view control.
Declaration
public virtual void Remove()
RemoveTreeView()
This method is used internally!
Declaration
public void RemoveTreeView()
ResumePropertyNotifications()
Resumes property notifications after a previous SuspendPropertyNotifications() call.
Declaration
public void ResumePropertyNotifications()
SetBooleanProperty(String, Int32, Boolean)
Declaration
protected virtual bool SetBooleanProperty(string propertyName, int propertyKey, bool value)
Parameters
System.String
propertyName
|
System.Int32
propertyKey
|
System.Boolean
value
|
Returns
System.Boolean
|
SetBoundChildNodesList(IBindingList)
Sets the IBindingList which holds the child nodes in Object Relational Binding mode
Declaration
protected virtual void SetBoundChildNodesList(IBindingList bindingList)
Parameters
System.ComponentModel.IBindingList
bindingList
|
SetCheckStateCore(ToggleState)
Declaration
protected virtual bool SetCheckStateCore(ToggleState value)
Parameters
ToggleState
value
|
Returns
System.Boolean
|
SuspendPropertyNotifications()
Allows PropertyChanged notifications to be temporary suspended.
Declaration
public void SuspendPropertyNotifications()
Toggle()
Toggles the tree node to either the expanded or collapsed state.
Declaration
public void Toggle()
ToString()
Returns a System.String that represents the tree node.
Declaration
public override string ToString()
Returns
System.String
A System.String that represents the tree node. |
Overrides
UpdateChildrenCheckState()
Declaration
protected virtual void UpdateChildrenCheckState()
UpdateParentCheckState()
Declaration
protected virtual void UpdateParentCheckState()
Events
PropertyChanged
Declaration
public event PropertyChangedEventHandler PropertyChanged
Event Type
System.ComponentModel.PropertyChangedEventHandler
|
Explicit Interface Implementations
IDataItem.DataBoundItem
Declaration
object IDataItem.DataBoundItem { get; set; }
Returns
System.Object
|
Implements
IDataItem.FieldCount
IDataItem.get_Item(Int32)
Declaration
object IDataItem.get_Item(int index)
Parameters
System.Int32
index
|
Returns
System.Object
|
Implements
IDataItem.get_Item(String)
Declaration
object IDataItem.get_Item(string name)
Parameters
System.String
name
|
Returns
System.Object
|
Implements
IDataItem.IndexOf(String)
Declaration
int IDataItem.IndexOf(string name)
Parameters
System.String
name
|
Returns
System.Int32
|
Implements
IDataItem.Item[Int32]
Declaration
object IDataItem.this[] { get; set; }
Parameters
System.Int32
index
|
Returns
System.Object
|
Implements
IDataItem.Item[String]
Declaration
object IDataItem.this[] { get; set; }
Parameters
System.String
name
|
Returns
System.Object
|
Implements
IDataItem.set_Item(Int32, Object)
Declaration
void IDataItem.set_Item(int index, object value)
Parameters
System.Int32
index
|
System.Object
value
|
Implements
IDataItem.set_Item(String, Object)
Declaration
void IDataItem.set_Item(string name, object value)
Parameters
System.String
name
|
System.Object
value
|