Class
RadTreeView

Represents a hierarchical tree view control that displays a collection of labeled items in a tree structure. Each item is represented by a RadTreeNode and can contain child nodes, images, and custom content. The control supports data binding, drag-and-drop operations, context menus, and various selection modes.

Definition

Namespace:Telerik.WinControls.UI

Assembly:Telerik.WinControls.UI.dll

Syntax:

cs-api-definition
[TelerikToolboxCategory("Data Controls")]
[ComplexBindingProperties("DataSource", "DataMember")]
[LookupBindingProperties("DataSource", "DisplayMember", "ValueMember", "SelectedNode")]
[Docking(DockingBehavior.Ask)]
public class RadTreeView : RadControl, IDropTarget, ISynchronizeInvoke, IWin32Window, IBindableComponent, IComponent, IDisposable, INotifyPropertyChanged, ISupportInitializeNotification, ISupportInitialize, IComponentTreeHandler, ILayoutHandler, IAnalyticsProvider, IFilterable, ISupportRootUIAutomation

Inheritance: objectMarshalByRefObjectComponentControlScrollableControlRadControlRadTreeView

Derived Classes: RadDataFilter

Implements: IAnalyticsProviderIBindableComponentIComponentIComponentTreeHandlerIDisposableIDropTargetIFilterableILayoutHandlerINotifyPropertyChangedISupportInitializeISupportInitializeNotificationISupportRootUIAutomationISynchronizeInvokeIWin32Window

Inherited Members RadControl.isResizing2RadControl.isDisposing2RadControl.invalidResizeRectRadControl.isAccessibilityRequestedRadControl.Construct()RadControl.CreateBehavior()RadControl.CreateRootElement()RadControl.InitializeRootElement(RootRadElement)RadControl.LoadElementTree()RadControl.LoadElementTree(Size)RadControl.SetBackColorThemeOverrides()RadControl.ResetBackColorThemeOverrides()RadControl.SetForeColorThemeOverrides()RadControl.ResetForeColorThemeOverrides()RadControl.OnKeyUp(KeyEventArgs)RadControl.OnPreviewKeyDown(PreviewKeyDownEventArgs)RadControl.OnDoubleClick(EventArgs)RadControl.OnMouseHover(EventArgs)RadControl.OnMouseCaptureChanged(EventArgs)RadControl.OnCreateControl()RadControl.OnHandleDestroyed(EventArgs)RadControl.OnParentChanged(EventArgs)RadControl.OnVisibleChanged(EventArgs)RadControl.OnFontChanged(EventArgs)RadControl.OnForeColorChanged(EventArgs)RadControl.OnBackColorChanged(EventArgs)RadControl.OnEnabledChanged(EventArgs)RadControl.OnLocationChanged(EventArgs)RadControl.OnPaddingChanged(EventArgs)RadControl.OnRightToLeftChanged(EventArgs)RadControl.OnPaint(PaintEventArgs)RadControl.OnLayout(LayoutEventArgs)RadControl.OnAutoSizeChanged(EventArgs)RadControl.OnInvalidated(RadElement)RadControl.OnCaptureLosing()RadControl.OnThemeChanged()RadControl.OnToolTipTextNeeded(object, ToolTipTextNeededEventArgs)RadControl.OnScreenTipNeeded(object, ScreenTipNeededEventArgs)RadControl.ProcessMnemonic(char)RadControl.ProcessFocusRequested(RadElement)RadControl.ProcessCaptureChangeRequested(RadElement, bool)RadControl.ProcessAutoSizeChanged(bool)RadControl.GetInputElement()RadControl.OnNotifyPropertyChanged(string)RadControl.GetPreferredSize(Size)RadControl.SetBoundsCore(int, int, int, int, BoundsSpecified)RadControl.GetRootElementDesiredSize(int, int, int, int)RadControl.OnZoomGesture(ZoomGestureEventArgs)RadControl.OnRotateGesture(RotateGestureEventArgs)RadControl.OnPanGesture(PanGestureEventArgs)RadControl.OnTwoFingerTapGesture(GestureEventArgs)RadControl.OnPressAndTapGesture(PressAndTapGestureEventArgs)RadControl.OnGesture(GestureEventArgs)RadControl.ProcessGesture(Message)RadControl.EnableGesture(GestureType)RadControl.DisableGesture(GestureType)RadControl.Refresh()RadControl.SuspendUpdate()RadControl.ResumeUpdate()RadControl.ResumeUpdate(bool)RadControl.InvokeLayoutCallback(LayoutCallback)RadControl.RegisterHostedControl(RadHostItem)RadControl.UnregisterHostedControl(RadHostItem, bool)RadControl.ResolveStyleGroupForElement(StyleGroup, RadObject)RadControl.GetPlainText()RadControl.ShouldSerializeProperty(RadProperty)RadControl.ShouldSerializeProperty(RadProperty, RadObject)RadControl.ResetProperty(RadProperty, RadObject)RadControl.CanEditElementAtDesignTime(RadElement)RadControl.FindPropertyInChildren(RadControl, IPCMessage)RadControl.ScaleControl(SizeF, BoundsSpecified)RadControl.PerformRadAutoScale(BoundsSpecified?)RadControl.GetMonitorDpiScaleFactor(Control)RadControl.SetRadAutoScale(bool)RadControl.EnableDpiScalingRadControl.EnableRadAutoScaleRadControl.EnableRadFormInitialDpiScalingRadControl.EnableImageDpiScalingRadControl.EnableSvgImagesRadControl.IsLoadedRadControl.ElementTreeRadControl.UseCompatibleTextRenderingDefaultValueRadControl.BehaviorRadControl.RootElementRadControl.PaddingRadControl.ThemeNameRadControl.TextRadControl.EnableThemingRadControl.ThemeClassNameRadControl.ImageListRadControl.ImageScalingSizeRadControl.UseCompatibleTextRenderingRadControl.AutoSizeRadControl.MaximumSizeRadControl.MinimumSizeRadControl.FocusableRadControl.SiteRadControl.CausesValidationRadControl.IsInitializingRadControl.SmallImageListRadControl.SmallImageScalingSizeRadControl.IsDesignModeRadControl.IsDisplayedRadControl.FocusedElementRadControl.AllowShowFocusCuesRadControl.ShowItemToolTipsRadControl.CommandBindingsRadControl.EnableKeyMapRadControl.BackColorRadControl.ForeColorRadControl.FontRadControl.ValidationCancelRadControl.EnableAnalyticsRadControl.AnalyticsNameRadControl.EnableRadAccessibilityObjectsRadControl.EnableCodedUITestsRadControl.EnableCodedUITestsDefaultValueRadControl.EnableUIAutomationDefaultValueRadControl.ElementInvalidatedRadControl.ToolTipTextNeededRadControl.ScreenTipNeededRadControl.ThemeNameChangedRadControl.InitializedRadControl.PropertyChangedRadControl.ZoomGestureRadControl.RotateGestureRadControl.PanGestureRadControl.TwoFingerTapGestureRadControl.PressAndTapGestureScrollableControl.ScrollStateAutoScrollingScrollableControl.ScrollStateHScrollVisibleScrollableControl.ScrollStateVScrollVisibleScrollableControl.ScrollStateUserHasScrolledScrollableControl.ScrollStateFullDragScrollableControl.AdjustFormScrollbars(bool)ScrollableControl.GetScrollState(int)ScrollableControl.OnPaintBackground(PaintEventArgs)ScrollableControl.SetDisplayRectLocation(int, int)ScrollableControl.ScrollControlIntoView(Control)ScrollableControl.ScrollToControl(Control)ScrollableControl.OnScroll(ScrollEventArgs)ScrollableControl.SetAutoScrollMargin(int, int)ScrollableControl.SetScrollState(int, bool)ScrollableControl.AutoScrollMarginScrollableControl.AutoScrollPositionScrollableControl.AutoScrollMinSizeScrollableControl.CreateParamsScrollableControl.DisplayRectangleScrollableControl.HScrollScrollableControl.HorizontalScrollScrollableControl.VScrollScrollableControl.VerticalScrollScrollableControl.ScrollControl.GetAccessibilityObjectById(int)Control.SetAutoSizeMode(AutoSizeMode)Control.GetAutoSizeMode()Control.AccessibilityNotifyClients(AccessibleEvents, int)Control.AccessibilityNotifyClients(AccessibleEvents, int, int)Control.BeginInvoke(Delegate)Control.BeginInvoke(Delegate, params object[])Control.BringToFront()Control.Contains(Control)Control.CreateControlsInstance()Control.CreateGraphics()Control.CreateHandle()Control.CreateControl()Control.DefWndProc(ref Message)Control.DestroyHandle()Control.DoDragDrop(object, DragDropEffects)Control.DrawToBitmap(Bitmap, Rectangle)Control.EndInvoke(IAsyncResult)Control.FindForm()Control.GetTopLevel()Control.RaiseKeyEvent(object, KeyEventArgs)Control.RaiseMouseEvent(object, MouseEventArgs)Control.Focus()Control.FromChildHandle(IntPtr)Control.FromHandle(IntPtr)Control.GetChildAtPoint(Point, GetChildAtPointSkip)Control.GetChildAtPoint(Point)Control.GetContainerControl()Control.GetScaledBounds(Rectangle, SizeF, BoundsSpecified)Control.GetNextControl(Control, bool)Control.GetStyle(ControlStyles)Control.Hide()Control.InitLayout()Control.Invalidate(Region)Control.Invalidate(Region, bool)Control.Invalidate()Control.Invalidate(bool)Control.Invalidate(Rectangle)Control.Invalidate(Rectangle, bool)Control.Invoke(Delegate)Control.Invoke(Delegate, params object[])Control.InvokePaint(Control, PaintEventArgs)Control.InvokePaintBackground(Control, PaintEventArgs)Control.IsKeyLocked(Keys)Control.IsInputChar(char)Control.IsMnemonic(char, string)Control.LogicalToDeviceUnits(int)Control.LogicalToDeviceUnits(Size)Control.ScaleBitmapLogicalToDevice(ref Bitmap)Control.NotifyInvalidate(Rectangle)Control.InvokeOnClick(Control, EventArgs)Control.OnBackgroundImageChanged(EventArgs)Control.OnBackgroundImageLayoutChanged(EventArgs)Control.OnCausesValidationChanged(EventArgs)Control.OnContextMenuChanged(EventArgs)Control.OnContextMenuStripChanged(EventArgs)Control.OnCursorChanged(EventArgs)Control.OnDockChanged(EventArgs)Control.OnNotifyMessage(Message)Control.OnParentBackColorChanged(EventArgs)Control.OnParentBackgroundImageChanged(EventArgs)Control.OnParentBindingContextChanged(EventArgs)Control.OnParentCursorChanged(EventArgs)Control.OnParentEnabledChanged(EventArgs)Control.OnParentFontChanged(EventArgs)Control.OnParentForeColorChanged(EventArgs)Control.OnParentRightToLeftChanged(EventArgs)Control.OnParentVisibleChanged(EventArgs)Control.OnPrint(PaintEventArgs)Control.OnTabIndexChanged(EventArgs)Control.OnTabStopChanged(EventArgs)Control.OnTextChanged(EventArgs)Control.OnClientSizeChanged(EventArgs)Control.OnControlAdded(ControlEventArgs)Control.OnControlRemoved(ControlEventArgs)Control.OnHandleCreated(EventArgs)Control.OnDragEnter(DragEventArgs)Control.OnDragOver(DragEventArgs)Control.OnDragLeave(EventArgs)Control.OnDragDrop(DragEventArgs)Control.OnGiveFeedback(GiveFeedbackEventArgs)Control.OnEnter(EventArgs)Control.InvokeGotFocus(Control, EventArgs)Control.OnHelpRequested(HelpEventArgs)Control.OnInvalidated(InvalidateEventArgs)Control.OnLeave(EventArgs)Control.InvokeLostFocus(Control, EventArgs)Control.OnMarginChanged(EventArgs)Control.OnDpiChangedBeforeParent(EventArgs)Control.OnDpiChangedAfterParent(EventArgs)Control.OnMove(EventArgs)Control.OnQueryContinueDrag(QueryContinueDragEventArgs)Control.OnRegionChanged(EventArgs)Control.OnResize(EventArgs)Control.OnSizeChanged(EventArgs)Control.OnChangeUICues(UICuesEventArgs)Control.OnStyleChanged(EventArgs)Control.OnSystemColorsChanged(EventArgs)Control.OnValidating(CancelEventArgs)Control.OnValidated(EventArgs)Control.RescaleConstantsForDpi(int, int)Control.PerformLayout()Control.PerformLayout(Control, string)Control.PointToClient(Point)Control.PointToScreen(Point)Control.PreProcessMessage(ref Message)Control.PreProcessControlMessage(ref Message)Control.ProcessCmdKey(ref Message, Keys)Control.ProcessDialogChar(char)Control.ProcessDialogKey(Keys)Control.ProcessKeyEventArgs(ref Message)Control.ProcessKeyMessage(ref Message)Control.ProcessKeyPreview(ref Message)Control.RaiseDragEvent(object, DragEventArgs)Control.RaisePaintEvent(object, PaintEventArgs)Control.RecreateHandle()Control.RectangleToClient(Rectangle)Control.RectangleToScreen(Rectangle)Control.ReflectMessage(IntPtr, ref Message)Control.ResetMouseEventArgs()Control.ResetText()Control.ResumeLayout()Control.ResumeLayout(bool)Control.Scale(SizeF)Control.Select()Control.Select(bool, bool)Control.SelectNextControl(Control, bool, bool, bool, bool)Control.SendToBack()Control.SetBounds(int, int, int, int)Control.SetBounds(int, int, int, int, BoundsSpecified)Control.SetClientSizeCore(int, int)Control.SizeFromClientSize(Size)Control.SetStyle(ControlStyles, bool)Control.SetTopLevel(bool)Control.SetVisibleCore(bool)Control.RtlTranslateAlignment(HorizontalAlignment)Control.RtlTranslateAlignment(LeftRightAlignment)Control.RtlTranslateAlignment(ContentAlignment)Control.RtlTranslateHorizontal(HorizontalAlignment)Control.RtlTranslateLeftRight(LeftRightAlignment)Control.RtlTranslateContent(ContentAlignment)Control.Show()Control.SuspendLayout()Control.Update()Control.UpdateBounds()Control.UpdateBounds(int, int, int, int)Control.UpdateBounds(int, int, int, int, int, int)Control.UpdateZOrder()Control.UpdateStyles()Control.OnImeModeChanged(EventArgs)Control.AccessibilityObjectControl.AccessibleDefaultActionDescriptionControl.AccessibleDescriptionControl.AccessibleNameControl.AccessibleRoleControl.AllowDropControl.AnchorControl.AutoScrollOffsetControl.LayoutEngineControl.BackgroundImageControl.BackgroundImageLayoutControl.BindingContextControl.BottomControl.BoundsControl.CanFocusControl.CanRaiseEventsControl.CanSelectControl.CaptureControl.CheckForIllegalCrossThreadCallsControl.ClientRectangleControl.ClientSizeControl.CompanyNameControl.ContainsFocusControl.ContextMenuControl.ControlsControl.CreatedControl.CursorControl.DataBindingsControl.DefaultBackColorControl.DefaultCursorControl.DefaultFontControl.DefaultForeColorControl.DefaultMarginControl.DefaultMaximumSizeControl.DefaultMinimumSizeControl.DefaultPaddingControl.DeviceDpiControl.IsDisposedControl.DisposingControl.DockControl.DoubleBufferedControl.EnabledControl.FocusedControl.FontHeightControl.HandleControl.HasChildrenControl.HeightControl.IsHandleCreatedControl.InvokeRequiredControl.IsAccessibleControl.IsMirroredControl.LeftControl.LocationControl.MarginControl.ModifierKeysControl.MouseButtonsControl.MousePositionControl.NameControl.ParentControl.ProductNameControl.ProductVersionControl.RecreatingHandleControl.RegionControl.RenderRightToLeftControl.ResizeRedrawControl.RightControl.RightToLeftControl.ScaleChildrenControl.SizeControl.TabIndexControl.TabStopControl.TagControl.TopControl.TopLevelControlControl.ShowKeyboardCuesControl.ShowFocusCuesControl.UseWaitCursorControl.VisibleControl.WidthControl.PreferredSizeControl.CanEnableImeControl.DefaultImeModeControl.ImeModeControl.ImeModeBaseControl.PropagatingImeModeControl.BackColorChangedControl.BackgroundImageChangedControl.BackgroundImageLayoutChangedControl.BindingContextChangedControl.CausesValidationChangedControl.ClientSizeChangedControl.ContextMenuChangedControl.ContextMenuStripChangedControl.CursorChangedControl.DockChangedControl.EnabledChangedControl.FontChangedControl.ForeColorChangedControl.LocationChangedControl.MarginChangedControl.RegionChangedControl.RightToLeftChangedControl.SizeChangedControl.TabIndexChangedControl.TabStopChangedControl.TextChangedControl.VisibleChangedControl.ClickControl.ControlAddedControl.ControlRemovedControl.DragDropControl.DragEnterControl.DragOverControl.DragLeaveControl.GiveFeedbackControl.HandleCreatedControl.HandleDestroyedControl.HelpRequestedControl.InvalidatedControl.PaddingChangedControl.PaintControl.QueryContinueDragControl.QueryAccessibilityHelpControl.DoubleClickControl.EnterControl.GotFocusControl.KeyDownControl.KeyPressControl.KeyUpControl.LayoutControl.LeaveControl.LostFocusControl.MouseClickControl.MouseDoubleClickControl.MouseCaptureChangedControl.MouseDownControl.MouseEnterControl.MouseLeaveControl.DpiChangedBeforeParentControl.DpiChangedAfterParentControl.MouseHoverControl.MouseMoveControl.MouseUpControl.MouseWheelControl.MoveControl.PreviewKeyDownControl.ResizeControl.ChangeUICuesControl.StyleChangedControl.SystemColorsChangedControl.ValidatingControl.ValidatedControl.ParentChangedControl.ImeModeChangedComponent.Dispose()Component.GetService(Type)Component.EventsComponent.ContainerComponent.DesignModeComponent.DisposedMarshalByRefObject.MemberwiseClone(bool)MarshalByRefObject.GetLifetimeService()MarshalByRefObject.InitializeLifetimeService()MarshalByRefObject.CreateObjRef(Type)

Constructors

RadTreeView()

Initializes a new instance of the RadTreeView class with default settings. Sets up event handlers and prepares the tree view for operation.

Declaration

cs-api-definition
public RadTreeView()

Properties

ActiveEditor

Gets the active editor currently being used for editing a tree node. Returns null if no node is currently being edited.

Declaration

cs-api-definition
public IInputEditor ActiveEditor { get; }

Property Value

IInputEditor

AllowAdd

Gets or sets a value indicating whether adding new tree nodes is allowed. When enabled, users can create new nodes through the user interface.

Declaration

cs-api-definition
public virtual bool AllowAdd { get; set; }

Property Value

bool

AllowArbitraryItemHeight

Gets or sets a value indicating whether tree nodes can have different heights. When enabled, individual nodes can be sized independently based on their content.

Declaration

cs-api-definition
[Browsable(true)]
public virtual bool AllowArbitraryItemHeight { get; set; }

Property Value

bool

AllowDefaultContextMenu

Gets or sets a value indicating whether the default context menu is enabled for the tree view. When enabled, a built-in context menu with common operations is available.

Declaration

cs-api-definition
public bool AllowDefaultContextMenu { get; set; }

Property Value

bool

AllowDragDrop

Gets or sets a value indicating whether drag and drop operations with tree view nodes are enabled. When enabled, users can drag nodes to reorder or move them within the tree structure.

Declaration

cs-api-definition
public virtual bool AllowDragDrop { get; set; }

Property Value

bool

AllowEdit

Gets or sets a value indicating whether node text editing is allowed. When enabled, users can edit node text by clicking on selected nodes or pressing F2.

Declaration

cs-api-definition
public virtual bool AllowEdit { get; set; }

Property Value

bool

AllowPlusMinusAnimation

Gets or sets a value indicating whether animation of expand/collapse buttons is enabled. When enabled, the plus/minus buttons will be animated during expand/collapse operations.

Declaration

cs-api-definition
public bool AllowPlusMinusAnimation { get; set; }

Property Value

bool

AllowRemove

Gets or sets a value indicating whether removing tree nodes is allowed. When enabled, users can delete nodes through the user interface.

Declaration

cs-api-definition
public virtual bool AllowRemove { get; set; }

Property Value

bool

AutoCheckChildNodes

Gets or sets a value indicating whether child nodes should be automatically checked when the tree view is in tri-state mode. When enabled, checking a parent node will automatically check all its child nodes.

Declaration

cs-api-definition
public virtual bool AutoCheckChildNodes { get; set; }

Property Value

bool

AutoScroll

Gets or sets a value indicating whether the control automatically provides scrollbars when content exceeds the visible area. This property controls the automatic display of scrollbars in the tree view when needed.

Declaration

cs-api-definition
[Browsable(false)]
public override bool AutoScroll { get; set; }

Property Value

bool

Overrides ScrollableControl.AutoScroll

CheckBoxes

Gets or sets a value indicating whether checkboxes are displayed beside the tree nodes. When enabled, users can check/uncheck nodes independently of selection.

Declaration

cs-api-definition
public virtual bool CheckBoxes { get; set; }

Property Value

bool

CheckedMember

Gets or sets the property in the data source that determines the checked state of tree node checkboxes. This property is used when CheckBoxes is enabled and the tree view is data-bound.

Declaration

cs-api-definition
public virtual string CheckedMember { get; set; }

Property Value

string

CheckedNodes

Gets the collection of tree nodes that are currently checked. This collection is populated when CheckBoxes is enabled.

Declaration

cs-api-definition
[Browsable(false)]
public virtual CheckedTreeNodeCollection CheckedNodes { get; }

Property Value

CheckedTreeNodeCollection

ChildMember

Gets or sets the property in the data source that contains child node data for hierarchical binding. This property is used for self-referencing data sources to establish parent-child relationships.

Declaration

cs-api-definition
public virtual string ChildMember { get; set; }

Property Value

string

ContextMenuStrip

Gets or sets the ContextMenuStrip associated with this control.

Declaration

cs-api-definition
[Browsable(false)]
public override ContextMenuStrip ContextMenuStrip { get; set; }

Property Value

ContextMenuStrip

Overrides Control.ContextMenuStrip

DataMember

Gets or sets the name of the data member in the data source for which the RadTreeView is displaying data. This property specifies which table or list within the data source to bind to.

Declaration

cs-api-definition
[Browsable(true)]
public virtual string DataMember { get; set; }

Property Value

string

DataSource

Gets or sets the data source that provides data for the RadTreeView. This can be any object that implements IList or IListSource.

Declaration

cs-api-definition
public virtual object DataSource { get; set; }

Property Value

object

Implements IFilterable.DataSource

DefaultSize

Gets the default size for the tree view control.

Declaration

cs-api-definition
protected override Size DefaultSize { get; }

Property Value

Size

Overrides Control.DefaultSize

DisplayMember

Gets or sets the property to display for each tree node when the tree view is data-bound. This property specifies which field from the data source should be used for node text.

Declaration

cs-api-definition
public virtual string DisplayMember { get; set; }

Property Value

string

DropHintColor

Gets or sets the color of the drop hint displayed during drag and drop operations. The drop hint provides visual feedback to assist users in understanding where items can be dropped.

Declaration

cs-api-definition
public Color DropHintColor { get; set; }

Property Value

Color

EnableDeferredScrolling

Gets or sets a value indicating whether deferred scrolling is enabled for improved performance. When enabled, scrolling updates are deferred until the scrolling operation completes.

Declaration

cs-api-definition
[Browsable(false)]
public bool EnableDeferredScrolling { get; set; }

Property Value

bool

EnableKineticScrolling

Gets or sets a value indicating whether kinetic scrolling is enabled for touch-based interactions. When enabled, scrolling continues with momentum after the user stops touching, providing a natural scrolling experience.

Declaration

cs-api-definition
[Browsable(true)]
public bool EnableKineticScrolling { get; set; }

Property Value

bool

EnableUIAutomation

Gets or sets a value indicating whether the UI Automation functionality is enabled or disabled for this control.

Declaration

cs-api-definition
public override bool EnableUIAutomation { get; set; }

Property Value

bool

Overrides RadControl.EnableUIAutomation

Implements ISupportRootUIAutomation.EnableUIAutomation

ExpandAnimation

Gets or sets the type of animation used when expanding or collapsing tree nodes. This property controls the visual effect applied during node expand/collapse operations.

Declaration

cs-api-definition
public ExpandAnimation ExpandAnimation { get; set; }

Property Value

ExpandAnimation

ExpandMode

Gets or sets the expand mode that controls how nodes can be expanded. This property determines whether single or multiple nodes can be expanded simultaneously.

Declaration

cs-api-definition
[Browsable(false)]
public ExpandMode ExpandMode { get; set; }

Property Value

ExpandMode

Filter

Gets or sets the filter applied to tree nodes. This property allows filtering of tree nodes based on custom criteria.

Declaration

cs-api-definition
[Browsable(false)]
public virtual object Filter { get; set; }

Property Value

object

FilterDescriptors

Gets the collection of filter descriptors applied to the tree view. These descriptors define the filtering criteria for tree nodes.

Declaration

cs-api-definition
[Browsable(false)]
public virtual FilterDescriptorCollection FilterDescriptors { get; }

Property Value

FilterDescriptorCollection

Implements IFilterable.FilterDescriptors

FindStringComparer

Gets or sets the string comparer used for keyboard navigation functionality. This comparer determines how text matching is performed during keyboard search.

Declaration

cs-api-definition
[Browsable(false)]
public virtual IFindStringComparer FindStringComparer { get; set; }

Property Value

IFindStringComparer

FullRowSelect

Gets or sets a value indicating whether the selection highlight spans the full width of the tree view. When enabled, the selected node highlight extends across the entire width of the control.

Declaration

cs-api-definition
public virtual bool FullRowSelect { get; set; }

Property Value

bool

HScrollBar

Gets the horizontal scroll bar element of the tree view control. This scroll bar appears when the tree content extends beyond the control's width.

Declaration

cs-api-definition
[Browsable(false)]
public RadScrollBarElement HScrollBar { get; }

Property Value

RadScrollBarElement

HideSelection

Gets or sets a value indicating whether the selection highlight is hidden when the control loses focus. When enabled, selected nodes remain visually highlighted even when the tree view is not focused.

Declaration

cs-api-definition
public virtual bool HideSelection { get; set; }

Property Value

bool

HotTracking

Gets or sets a value indicating whether hot tracking is enabled for tree nodes. When enabled, nodes are highlighted when the mouse pointer hovers over them.

Declaration

cs-api-definition
public virtual bool HotTracking { get; set; }

Property Value

bool

ImageIndex

Gets or sets the default image index for tree nodes in the associated ImageList. This value is used for nodes that don't have a specific image index assigned.

Declaration

cs-api-definition
[RelatedImageList("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

int

ImageKey

Gets or sets the default image key for tree nodes in the associated ImageList. This value is used for nodes that don't have a specific image key assigned.

Declaration

cs-api-definition
[RelatedImageList("ImageList")]
[TypeConverter(typeof(ImageKeyConverter))]
public virtual string ImageKey { get; set; }

Property Value

string

IsEditing

Gets a value indicating whether there is an active editor currently open for editing a tree node. Returns true if a node is currently being edited, false otherwise.

Declaration

cs-api-definition
[Browsable(true)]
public bool IsEditing { get; }

Property Value

bool

ItemHeight

Gets or sets the height of tree view items in pixels. This property controls the vertical spacing of tree nodes.

Declaration

cs-api-definition
[Browsable(false)]
public virtual int ItemHeight { get; set; }

Property Value

int

KeyboardSearchEnabled

Gets or sets a value indicating whether keyboard search navigation is enabled. When enabled, users can navigate to nodes by typing the first characters of node text.

Declaration

cs-api-definition
[Browsable(true)]
public virtual bool KeyboardSearchEnabled { get; set; }

Property Value

bool

KeyboardSearchResetInterval

Gets or sets the time interval in milliseconds before keyboard search is reset. This determines how long to wait between keystrokes before starting a new search.

Declaration

cs-api-definition
[Browsable(true)]
public virtual int KeyboardSearchResetInterval { get; set; }

Property Value

int

LazyMode

Gets or sets a value indicating whether the tree view loads child node collections in the NodesNeeded event only when parent nodes are expanded. This lazy loading approach improves performance by deferring node loading until actually needed.

Declaration

cs-api-definition
[Browsable(false)]
public bool LazyMode { get; set; }

Property Value

bool

LineColor

Gets or sets the color of the lines connecting parent and child nodes in the tree view. This property is only effective when ShowLines is enabled.

Declaration

cs-api-definition
public virtual Color LineColor { get; set; }

Property Value

Color

LineStyle

Gets or sets the style of lines connecting parent and child nodes in the tree view. This property controls the visual appearance of the connecting lines when ShowLines is enabled.

Declaration

cs-api-definition
public virtual TreeLineStyle LineStyle { get; set; }

Property Value

TreeLineStyle

LineWidth

Gets or sets the width in pixels of the lines connecting parent and child nodes. This property controls the thickness of the connecting lines when ShowLines is enabled.

Declaration

cs-api-definition
public virtual float LineWidth { get; set; }

Property Value

float

MultiSelect

Gets or sets a value indicating whether the user is allowed to select multiple tree nodes at one time. When enabled, users can hold Ctrl or Shift keys to select multiple nodes.

Declaration

cs-api-definition
public virtual bool MultiSelect { get; set; }

Property Value

bool

Nodes

Gets the collection of tree nodes that are assigned to the tree view control. This collection contains all root-level nodes and provides access to the entire tree structure.

Declaration

cs-api-definition
[Browsable(true)]
public virtual RadTreeNodeCollection Nodes { get; }

Property Value

RadTreeNodeCollection

ParentMember

Gets or sets the property in the data source that identifies the parent node for hierarchical binding. This property is used for self-referencing data sources to establish parent-child relationships.

Declaration

cs-api-definition
public virtual string ParentMember { get; set; }

Property Value

string

PathSeparator

Gets or sets the character used as a separator in the node path. This separator is used when constructing or parsing hierarchical node paths.

Declaration

cs-api-definition
public virtual string PathSeparator { get; set; }

Property Value

string

PlusMinusAnimationStep

Gets or sets the opacity animation step for expand/collapse animation. This controls the granularity of the opacity change during node expand/collapse animations.

Declaration

cs-api-definition
[Browsable(false)]
public double PlusMinusAnimationStep { get; set; }

Property Value

double

RadContextMenu

Gets or sets the RadContextMenu associated with this tree view control. This context menu is displayed when users right-click on the tree view.

Declaration

cs-api-definition
public virtual RadContextMenu RadContextMenu { get; set; }

Property Value

RadContextMenu

RelationBindings

Gets the collection of relation bindings that define how hierarchical data relationships are established. This collection contains data binding settings for related data in master-detail scenarios.

Declaration

cs-api-definition
[Browsable(true)]
public RelationBindingCollection RelationBindings { get; }

Property Value

RelationBindingCollection

SelectedNode

Gets or sets the currently selected tree node. Returns null if no node is selected.

Declaration

cs-api-definition
[Browsable(false)]
public virtual RadTreeNode SelectedNode { get; set; }

Property Value

RadTreeNode

SelectedNodes

Gets the collection of currently selected tree nodes. This collection contains all selected nodes when MultiSelect is enabled.

Declaration

cs-api-definition
[Browsable(false)]
public virtual SelectedTreeNodeCollection SelectedNodes { get; }

Property Value

SelectedTreeNodeCollection

ShowDragHint

Gets or sets a value indicating whether drag hints are displayed when dragging items. When enabled, visual feedback shows the item being dragged during drag and drop operations.

Declaration

cs-api-definition
public bool ShowDragHint { get; set; }

Property Value

bool

ShowDropHint

Gets or sets a value indicating whether drop hints are displayed during drag and drop operations. When enabled, visual indicators show where items can be dropped in the tree hierarchy.

Declaration

cs-api-definition
public bool ShowDropHint { get; set; }

Property Value

bool

ShowExpandCollapse

Gets or sets a value indicating whether expand/collapse buttons are shown next to nodes with children. When enabled, plus/minus buttons allow users to expand or collapse parent nodes.

Declaration

cs-api-definition
public bool ShowExpandCollapse { get; set; }

Property Value

bool

ShowLines

Gets or sets a value indicating whether lines connecting parent and child nodes are displayed. When enabled, visual lines show the hierarchical relationship between nodes.

Declaration

cs-api-definition
public virtual bool ShowLines { get; set; }

Property Value

bool

ShowNodeToolTips

Gets or sets a value indicating whether tooltips are displayed for tree nodes. When enabled, node tooltips will be shown when hovering over nodes with the mouse.

Declaration

cs-api-definition
public bool ShowNodeToolTips { get; set; }

Property Value

bool

ShowRootLines

Gets or sets a value indicating whether lines are displayed between root-level nodes. When enabled, connecting lines are shown between top-level nodes in the tree view.

Declaration

cs-api-definition
public bool ShowRootLines { get; set; }

Property Value

bool

SortDescriptors

Gets the collection of sort descriptors applied to the tree view. These descriptors define the sorting criteria for tree nodes.

Declaration

cs-api-definition
[Browsable(false)]
public SortDescriptorCollection SortDescriptors { get; }

Property Value

SortDescriptorCollection

SortOrder

Gets or sets the sort order of tree nodes. This property controls how nodes are sorted within each level of the tree hierarchy.

Declaration

cs-api-definition
[Browsable(true)]
public SortOrder SortOrder { get; set; }

Property Value

SortOrder

SpacingBetweenNodes

Gets or sets the vertical spacing in pixels between tree nodes. This property controls the gap between adjacent nodes in the tree view.

Declaration

cs-api-definition
public int SpacingBetweenNodes { get; set; }

Property Value

int

ToggleMode

Gets or sets the default toggle mode for expanding and collapsing tree nodes. This property determines how users can expand or collapse nodes (single click, double click, etc.).

Declaration

cs-api-definition
public virtual ToggleMode ToggleMode { get; set; }

Property Value

ToggleMode

ToggleStateConverter

Gets or sets a TypeConverter used to convert checkbox toggle states to the underlying data type. This converter is used when binding checkbox states to data source properties.

Declaration

cs-api-definition
public virtual TypeConverter ToggleStateConverter { get; set; }

Property Value

TypeConverter

TopNode

Gets the topmost visible tree node in the tree view control. This property returns the first node that is currently visible in the control's view area.

Declaration

cs-api-definition
[Browsable(false)]
public RadTreeNode TopNode { get; }

Property Value

RadTreeNode

TreeIndent

Gets or sets the indentation distance in pixels for each level of tree nodes. This controls the horizontal spacing between parent and child nodes.

Declaration

cs-api-definition
public int TreeIndent { get; set; }

Property Value

int

TreeViewElement

Gets the underlying tree view element that provides the core functionality for the control. This element contains the main logic and rendering capabilities of the tree view.

Declaration

cs-api-definition
[Browsable(false)]
public virtual RadTreeViewElement TreeViewElement { get; }

Property Value

RadTreeViewElement

TreeViewXml

Gets or sets the XML representation of the tree view structure. This property allows saving and loading the entire tree structure as XML data.

Declaration

cs-api-definition
public string TreeViewXml { get; set; }

Property Value

string

TriStateMode

Gets or sets a value indicating whether tri-state mode is enabled for node checkboxes. When enabled, checkboxes can have three states: checked, unchecked, and indeterminate.

Declaration

cs-api-definition
public virtual bool TriStateMode { get; set; }

Property Value

bool

VScrollBar

Gets the vertical scroll bar element of the tree view control. This scroll bar appears when the tree content extends beyond the control's height.

Declaration

cs-api-definition
[Browsable(false)]
public RadScrollBarElement VScrollBar { get; }

Property Value

RadScrollBarElement

ValueMember

Gets or sets the property in the data source that provides the value for each tree node. This property specifies which field from the data source should be used for node values.

Declaration

cs-api-definition
public virtual string ValueMember { get; set; }

Property Value

string

VisibleCount

Gets the number of tree nodes that can be fully visible in the tree view control. This count is based on the current size of the control and the height of the nodes.

Declaration

cs-api-definition
[Browsable(false)]
public int VisibleCount { get; }

Property Value

int

Methods

AddNodeByPath(string)

Creates a new tree node and adds it at the location specified by the hierarchical path. The path is parsed using the PathSeparator to determine the node hierarchy.

Declaration

cs-api-definition
public virtual RadTreeNode AddNodeByPath(string path)

Parameters

path

string

The hierarchical path where the node should be added.

Returns

RadTreeNode

The newly created RadTreeNode if the operation is successful.

AddNodeByPath(string, string)

Creates a new tree node and adds it at the location specified by the hierarchical path using a custom path separator. The path is parsed using the specified separator to determine the node hierarchy.

Declaration

cs-api-definition
public virtual RadTreeNode AddNodeByPath(string path, string pathSeparator)

Parameters

path

string

The hierarchical path where the node should be added.

pathSeparator

string

The custom path separator to use for parsing the path.

Returns

RadTreeNode

The newly created RadTreeNode if the operation is successful.

BeginEdit()

Begins edit mode for the currently selected tree node.

Declaration

cs-api-definition
public bool BeginEdit()

Returns

bool

True if edit mode was successfully started; otherwise, false.

BeginInit()

Suspends layout during initialization.

Declaration

cs-api-definition
public override void BeginInit()

Overrides RadControl.BeginInit()

BeginUpdate()

Disables visual updates to the tree view to improve performance during batch operations. Must be paired with a call to EndUpdate().

Declaration

cs-api-definition
public void BeginUpdate()

BringIntoView(RadTreeNode)

Scrolls the tree view to ensure the specified node is visible within the control's display area.

Declaration

cs-api-definition
public void BringIntoView(RadTreeNode node)

Parameters

node

RadTreeNode

The tree node to bring into view.

CancelEdit()

Closes the currently active editor and discards any changes made during editing.

Declaration

cs-api-definition
public void CancelEdit()

ClearSelection()

Clears the current node selection, deselecting all currently selected nodes.

Declaration

cs-api-definition
public virtual void ClearSelection()

CollapseAll()

Collapses all tree nodes in the tree view, hiding all child nodes.

Declaration

cs-api-definition
public void CollapseAll()

CollapseAll(RadTreeNodeCollection)

Collapses all nodes in the specified collection, hiding their child nodes.

Declaration

cs-api-definition
public void CollapseAll(RadTreeNodeCollection nodes)

Parameters

nodes

RadTreeNodeCollection

The collection of nodes to be collapsed.

CreateAccessibilityInstance()

Declaration

cs-api-definition
protected override AccessibleObject CreateAccessibilityInstance()

Returns

AccessibleObject

Overrides Control.CreateAccessibilityInstance()

CreateChildItems(RadElement)

Creates the child elements that make up the tree view control structure. This method instantiates the main RadTreeViewElement and adds it to the parent container.

Declaration

cs-api-definition
protected override void CreateChildItems(RadElement parent)

Parameters

parent

RadElement

The parent RadElement that will contain the child elements.

Overrides RadControl.CreateChildItems(RadElement)

CreateTreeViewElement()

Creates and returns a new instance of the tree view element that provides the core functionality. This method can be overridden in derived classes to provide custom tree view element implementations.

Declaration

cs-api-definition
protected virtual RadTreeViewElement CreateTreeViewElement()

Returns

RadTreeViewElement

A new RadTreeViewElement instance.

DeferRefresh()

Defers refresh operations for the tree view, returning a disposable object that triggers refresh when disposed. This is useful for batching multiple operations while maintaining automatic cleanup.

Declaration

cs-api-definition
public virtual IDisposable DeferRefresh()

Returns

IDisposable

An IDisposable object that triggers refresh when disposed.

Dispose(bool)

Releases the unmanaged resources used by the RadTreeView and optionally releases the managed resources. This method cleans up event handlers and disposes of the context menu if it's the default implementation.

Declaration

cs-api-definition
protected override void Dispose(bool disposing)

Parameters

disposing

bool

true to release both managed and unmanaged resources; false to release only unmanaged resources.

Overrides RadControl.Dispose(bool)

EndEdit()

Commits any changes and ends the edit operation on the currently edited node.

Declaration

cs-api-definition
public bool EndEdit()

Returns

bool

True if the edit operation was successfully ended; otherwise, false.

EndInit()

Resumes layout.

Declaration

cs-api-definition
public override void EndInit()

Overrides RadControl.EndInit()

EndUpdate()

Re-enables visual updates to the tree view after a call to BeginUpdate(). This will refresh the tree view display with any changes made during the update period.

Declaration

cs-api-definition
public void EndUpdate()

Execute(ICommand, params object[])

Executes the specified command on the tree view with optional settings.

Declaration

cs-api-definition
public object Execute(ICommand command, params object[] settings)

Parameters

command

ICommand

The command to execute.

settings

object[]

Optional settings or parameters for the command.

Returns

object

The result of the command execution, if any.

Execute(bool, ICommand, params object[])

Executes the specified command on the tree view with control over subtree inclusion.

Declaration

cs-api-definition
public object Execute(bool includeSubTrees, ICommand command, params object[] settings)

Parameters

includeSubTrees

bool

True to include subtrees in the command execution; otherwise, false.

command

ICommand

The command to execute.

settings

object[]

Optional settings or parameters for the command.

Returns

object

The result of the command execution, if any.

ExecuteBatchCommand(RadTreeNode, int, ICommand, params object[])

Executes a command over an entire subtree starting with the specified node.

Declaration

cs-api-definition
public static List<object> ExecuteBatchCommand(RadTreeNode node, int level, ICommand command, params object[] settings)

Parameters

node

RadTreeNode

The node form which the execuition starts.

level

int

The level of nodes over which to execute the command. If -1 the entire subtree is traversed.

command

ICommand

The command to execute.

settings

object[]

Parameters to pass the command prior to execution.

Returns

List<object>

The results from the batch execution.

ExecuteBatchCommand(RadTreeNodeCollection, int, ICommand, params object[])

Executes a command over an entire subtree starting with the specified node collection. This static method allows batch operations across multiple tree branches.

Declaration

cs-api-definition
public static List<object> ExecuteBatchCommand(RadTreeNodeCollection nodes, int level, ICommand command, params object[] settings)

Parameters

nodes

RadTreeNodeCollection

The collection of nodes from which execution starts.

level

int

The level of nodes over which to execute the command. If -1, the entire subtree is traversed.

command

ICommand

The command to execute on each node.

settings

object[]

Parameters to pass to the command prior to execution.

Returns

List<object>

A list containing the results from the batch execution.

ExecuteScalarCommand(RadTreeNode, int, ICommand, params object[])

Executes a command over an entire subtree starting with the specified node. This static method returns the first result from the batch execution.

Declaration

cs-api-definition
public static object ExecuteScalarCommand(RadTreeNode node, int level, ICommand command, params object[] settings)

Parameters

node

RadTreeNode

The node from which execution starts.

level

int

The level of nodes over which to execute the command. If -1, the entire subtree is traversed.

command

ICommand

The command to execute on each node.

settings

object[]

Parameters to pass to the command prior to execution.

Returns

object

The first result from the batch execution.

ExpandAll()

Expands all tree nodes in the tree view, revealing all child nodes.

Declaration

cs-api-definition
public void ExpandAll()

ExpandAll(RadTreeNodeCollection)

Expands all nodes in the specified collection, revealing their child nodes.

Declaration

cs-api-definition
public virtual void ExpandAll(RadTreeNodeCollection nodes)

Parameters

nodes

RadTreeNodeCollection

The collection of nodes to be expanded.

Find(Predicate<RadTreeNode>)

Searches for the first tree node that matches the specified predicate function.

Declaration

cs-api-definition
public RadTreeNode Find(Predicate<RadTreeNode> match)

Parameters

match

Predicate<RadTreeNode>

A predicate function that defines the search criteria.

Returns

RadTreeNode

The first RadTreeNode that matches the predicate, or null if no match is found.

Find(string)

Searches for the first tree node whose text contains the specified string.

Declaration

cs-api-definition
public virtual RadTreeNode Find(string text)

Parameters

text

string

The text to search for within node text.

Returns

RadTreeNode

The first RadTreeNode containing the specified text, or null if not found.

Find<T>(FindAction<T>, T)

Searches for the first tree node that matches the specified search function with a parameter.

Declaration

cs-api-definition
public RadTreeNode Find<T>(FindAction<T> match, T arg)

Parameters

match

FindAction<T>

A function that defines the search criteria with a parameter.

arg

T

The argument to pass to the search function.

Returns

RadTreeNode

The first RadTreeNode that matches the criteria, or null if no match is found.

FindNodes(Predicate<RadTreeNode>)

Searches for all tree nodes that match the specified predicate function.

Declaration

cs-api-definition
public RadTreeNode[] FindNodes(Predicate<RadTreeNode> match)

Parameters

match

Predicate<RadTreeNode>

A predicate function that defines the search criteria.

Returns

RadTreeNode[]

An array of RadTreeNode objects that match the predicate.

FindNodes(string)

Searches for all tree nodes whose text contains the specified string.

Declaration

cs-api-definition
public virtual RadTreeNode[] FindNodes(string text)

Parameters

text

string

The text to search for within node text.

Returns

RadTreeNode[]

An array of RadTreeNode objects containing the specified text.

FindNodes<T>(FindAction<T>, T)

Searches for all tree nodes that match the specified search function with a parameter.

Declaration

cs-api-definition
public RadTreeNode[] FindNodes<T>(FindAction<T> match, T arg)

Parameters

match

FindAction<T>

A function that defines the search criteria with a parameter.

arg

T

The argument to pass to the search function.

Returns

RadTreeNode[]

An array of RadTreeNode objects that match the criteria.

ForEach(Action<RadTreeNode>)

Executes the specified action for every tree node in the tree view. The action is applied recursively to all nodes in the tree structure.

Declaration

cs-api-definition
public void ForEach(Action<RadTreeNode> action)

Parameters

action

Action<RadTreeNode>

The action to execute for each tree node.

GetNodeAt(Point)

Retrieves the tree node located at the specified point in client coordinates.

Declaration

cs-api-definition
public RadTreeNode GetNodeAt(Point pt)

Parameters

pt

Point

The point to evaluate and retrieve the node from.

Returns

RadTreeNode

The RadTreeNode at the specified point, or null if no node exists at that location.

GetNodeAt(int, int)

Retrieves the tree node located at the specified coordinates in client coordinates.

Declaration

cs-api-definition
public RadTreeNode GetNodeAt(int x, int y)

Parameters

x

int

The X coordinate to evaluate and retrieve the node from.

y

int

The Y coordinate to evaluate and retrieve the node from.

Returns

RadTreeNode

The RadTreeNode at the specified location, or null if no node exists at that location.

GetNodeByName(string)

Retrieves the first tree node with the specified name from the entire tree. Searches recursively through all nodes in the tree view.

Declaration

cs-api-definition
public RadTreeNode GetNodeByName(string name)

Parameters

name

string

The name of the node to find.

Returns

RadTreeNode

The first RadTreeNode with the specified name, or null if not found.

GetNodeByName(string, RadTreeNode)

Retrieves the first tree node with the specified name, searching from a specific root node. Searches recursively through the specified root node and its descendants.

Declaration

cs-api-definition
public RadTreeNode GetNodeByName(string name, RadTreeNode rootNode)

Parameters

name

string

The name of the node to find.

rootNode

RadTreeNode

The root node to begin the search from.

Returns

RadTreeNode

The first RadTreeNode with the specified name, or null if not found.

GetNodeByPath(string)

Retrieves a tree node by following the specified hierarchical path. The path is parsed using the current PathSeparator value.

Declaration

cs-api-definition
public virtual RadTreeNode GetNodeByPath(string path)

Parameters

path

string

The hierarchical path to the desired node.

Returns

RadTreeNode

The RadTreeNode at the specified path, or null if not found.

GetNodeByPath(string, string)

Retrieves a tree node by following the specified hierarchical path using a custom path separator. The path is parsed using the specified separator to locate the node.

Declaration

cs-api-definition
public virtual RadTreeNode GetNodeByPath(string path, string pathSeparator)

Parameters

path

string

The hierarchical path to the desired node.

pathSeparator

string

The custom path separator to use for parsing the path.

Returns

RadTreeNode

The RadTreeNode at the specified path, or null if not found.

GetNodeCount(bool)

Retrieves the total number of tree nodes in the tree view control.

Declaration

cs-api-definition
public int GetNodeCount(bool includeSubTrees)

Parameters

includeSubTrees

bool

True to include nodes in all subtrees; false to count only top-level nodes.

Returns

int

The total number of tree nodes in the control.

IsInputKey(Keys)

Declaration

cs-api-definition
protected override bool IsInputKey(Keys keyData)

Parameters

keyData

Keys

Returns

bool

Overrides RadControl.IsInputKey(Keys)

LoadXML(Stream, params Type[])

Loads tree view structure from an XML stream with support for additional custom types.

Declaration

cs-api-definition
public void LoadXML(Stream stream, params Type[] extraTypes)

Parameters

stream

Stream

The stream containing XML data to load.

extraTypes

Type[]

Additional types that should be recognized during XML deserialization.

LoadXML(string, params Type[])

Loads tree view structure from an XML file with support for additional custom types.

Declaration

cs-api-definition
public void LoadXML(string fileName, params Type[] extraTypes)

Parameters

fileName

string

The path to the XML file to load.

extraTypes

Type[]

Additional types that should be recognized during XML deserialization.

LoadXMLWithReader(XmlReader, params Type[])

Loads tree view structure from an XML reader with support for additional custom types.

Declaration

cs-api-definition
protected virtual void LoadXMLWithReader(XmlReader reader, params Type[] extraTypes)

Parameters

reader

XmlReader

The XML reader containing the tree structure data.

extraTypes

Type[]

Additional types that should be recognized during XML deserialization.

OnBindingContextChanged(EventArgs)

Declaration

cs-api-definition
protected override void OnBindingContextChanged(EventArgs e)

Parameters

e

EventArgs

Overrides RadControl.OnBindingContextChanged(EventArgs)

OnClick(EventArgs)

Declaration

cs-api-definition
protected override void OnClick(EventArgs e)

Parameters

e

EventArgs

Overrides RadControl.OnClick(EventArgs)

OnGotFocus(EventArgs)

Declaration

cs-api-definition
protected override void OnGotFocus(EventArgs e)

Parameters

e

EventArgs

Overrides RadControl.OnGotFocus(EventArgs)

OnKeyDown(KeyEventArgs)

Declaration

cs-api-definition
protected override void OnKeyDown(KeyEventArgs e)

Parameters

e

KeyEventArgs

Overrides RadControl.OnKeyDown(KeyEventArgs)

OnKeyPress(KeyPressEventArgs)

Declaration

cs-api-definition
protected override void OnKeyPress(KeyPressEventArgs e)

Parameters

e

KeyPressEventArgs

Overrides RadControl.OnKeyPress(KeyPressEventArgs)

OnLoad(Size)

Handles the load event and enables pan gesture support for touch interactions. This method is called when the control is loaded and initializes gesture-based navigation.

Declaration

cs-api-definition
protected override void OnLoad(Size desiredSize)

Parameters

desiredSize

Size

The desired size for the control.

Overrides RadControl.OnLoad(Size)

OnLostFocus(EventArgs)

Declaration

cs-api-definition
protected override void OnLostFocus(EventArgs e)

Parameters

e

EventArgs

Overrides RadControl.OnLostFocus(EventArgs)

OnMouseClick(MouseEventArgs)

Declaration

cs-api-definition
protected override void OnMouseClick(MouseEventArgs e)

Parameters

e

MouseEventArgs

Overrides Control.OnMouseClick(MouseEventArgs)

OnMouseDoubleClick(MouseEventArgs)

Declaration

cs-api-definition
protected override void OnMouseDoubleClick(MouseEventArgs e)

Parameters

e

MouseEventArgs

Overrides Control.OnMouseDoubleClick(MouseEventArgs)

OnMouseDown(MouseEventArgs)

Declaration

cs-api-definition
protected override void OnMouseDown(MouseEventArgs e)

Parameters

e

MouseEventArgs

Overrides RadControl.OnMouseDown(MouseEventArgs)

OnMouseEnter(EventArgs)

Declaration

cs-api-definition
protected override void OnMouseEnter(EventArgs e)

Parameters

e

EventArgs

Overrides RadControl.OnMouseEnter(EventArgs)

OnMouseLeave(EventArgs)

Declaration

cs-api-definition
protected override void OnMouseLeave(EventArgs e)

Parameters

e

EventArgs

Overrides RadControl.OnMouseLeave(EventArgs)

OnMouseMove(MouseEventArgs)

Declaration

cs-api-definition
protected override void OnMouseMove(MouseEventArgs e)

Parameters

e

MouseEventArgs

Overrides RadControl.OnMouseMove(MouseEventArgs)

OnMouseUp(MouseEventArgs)

Declaration

cs-api-definition
protected override void OnMouseUp(MouseEventArgs e)

Parameters

e

MouseEventArgs

Overrides RadControl.OnMouseUp(MouseEventArgs)

OnMouseWheel(MouseEventArgs)

Declaration

cs-api-definition
protected override void OnMouseWheel(MouseEventArgs e)

Parameters

e

MouseEventArgs

Overrides RadControl.OnMouseWheel(MouseEventArgs)

OnNotifyPropertyChanged(PropertyChangedEventArgs)

Handles property change notifications and updates the tree view as needed.

Declaration

cs-api-definition
protected override void OnNotifyPropertyChanged(PropertyChangedEventArgs e)

Parameters

e

PropertyChangedEventArgs

The property change event arguments.

Overrides RadControl.OnNotifyPropertyChanged(PropertyChangedEventArgs)

OnThemeNameChanged(ThemeNameChangedEventArgs)

Processes Windows theme changes and updates the tree view appearance accordingly.

Declaration

cs-api-definition
protected override void OnThemeNameChanged(ThemeNameChangedEventArgs e)

Parameters

e

ThemeNameChangedEventArgs

The theme change event arguments.

Overrides RadControl.OnThemeNameChanged(ThemeNameChangedEventArgs)

ProcessCodedUIMessage(ref IPCMessage)

Declaration

cs-api-definition
protected override void ProcessCodedUIMessage(ref IPCMessage request)

Parameters

request

IPCMessage

Overrides RadControl.ProcessCodedUIMessage(ref IPCMessage)

SaveXML(Stream, params Type[])

Saves the tree view structure to an XML stream with support for additional custom types.

Declaration

cs-api-definition
public void SaveXML(Stream stream, params Type[] extraTypes)

Parameters

stream

Stream

The stream to write XML data to.

extraTypes

Type[]

Additional types that should be included in XML serialization.

SaveXML(string, params Type[])

Saves the tree view structure to an XML file with support for additional custom types.

Declaration

cs-api-definition
public void SaveXML(string fileName, params Type[] extraTypes)

Parameters

fileName

string

The path where the XML file should be saved.

extraTypes

Type[]

Additional types that should be included in XML serialization.

SaveXMLWithWriter(TextWriter, params Type[])

Saves the tree view structure to an XML writer with support for additional custom types.

Declaration

cs-api-definition
protected virtual void SaveXMLWithWriter(TextWriter writer, params Type[] extraTypes)

Parameters

writer

TextWriter

The text writer to save XML data to.

extraTypes

Type[]

Additional types that should be included in XML serialization.

SelectAll()

Selects all tree nodes in the tree view when MultiSelect is enabled.

Declaration

cs-api-definition
public virtual void SelectAll()

SetError(string, RadTreeNode)

Sets an error message for a specific tree node, typically used for validation feedback.

Declaration

cs-api-definition
public void SetError(string text, RadTreeNode radTreeNode)

Parameters

text

string

The error message text to display.

radTreeNode

RadTreeNode

The tree node to associate with the error.

ToString()

Returns a string representation of this tree view control, including node count information.

Declaration

cs-api-definition
public override string ToString()

Returns

string

A string that represents the current tree view control.

Overrides Component.ToString()

UnwireEvents()

Removes event handler connections for the tree view control during cleanup. This method unsubscribes from events to prevent memory leaks when the control is disposed.

Declaration

cs-api-definition
protected virtual void UnwireEvents()

WireEvents()

Establishes event handler connections for the tree view control. This method subscribes to essential events like SelectedNodeChanged for proper functionality.

Declaration

cs-api-definition
protected virtual void WireEvents()

WndProc(ref Message)

Processes Windows messages for the tree view control, including context menu handling.

Declaration

cs-api-definition
protected override void WndProc(ref Message m)

Parameters

m

Message

The Windows message to process.

Overrides RadControl.WndProc(ref Message)

Events

ContextMenuOpening

Occurs when a context menu is about to be opened for the tree view. This event allows customization of the context menu before it is displayed.

Declaration

cs-api-definition
public event TreeViewContextMenuOpeningEventHandler ContextMenuOpening

Event Value

TreeViewContextMenuOpeningEventHandler

CreateNode

Occurs when a new tree node is about to be created during data binding or programmatic operations. This event allows customization of node creation and assignment of custom node types.

Declaration

cs-api-definition
public event CreateTreeNodeEventHandler CreateNode

Event Value

CreateTreeNodeEventHandler

CreateNodeElement

Occurs when a new tree node element is about to be created for visual rendering. This event allows customization of the visual element that represents a tree node.

Declaration

cs-api-definition
public event CreateTreeNodeElementEventHandler CreateNodeElement

Event Value

CreateTreeNodeElementEventHandler

DataError

Occurs when a data binding error is encountered during tree view operations. This event allows handling and responding to data-related errors gracefully.

Declaration

cs-api-definition
public event TreeNodeDataErrorEventHandler DataError

Event Value

TreeNodeDataErrorEventHandler

DragEnded

Occurs after a drag operation has completed successfully. This event is raised when nodes have been moved or copied to their new location.

Declaration

cs-api-definition
public event RadTreeView.DragEndedHandler DragEnded

Event Value

RadTreeView.DragEndedHandler

DragEnding

Occurs when a drag operation is about to end, allowing cancellation of the drop operation. This event provides an opportunity to validate and potentially cancel the drag operation.

Declaration

cs-api-definition
public event RadTreeView.DragEndingHandler DragEnding

Event Value

RadTreeView.DragEndingHandler

DragOverNode

Occurs when dragged content is positioned over a tree node during a drag operation. This event allows customization of visual feedback and validation of drop targets.

Declaration

cs-api-definition
public event EventHandler<RadTreeViewDragCancelEventArgs> DragOverNode

Event Value

EventHandler<RadTreeViewDragCancelEventArgs>

DragStarted

Occurs after a drag operation has begun and the node is being dragged. This event indicates that the drag operation is now active.

Declaration

cs-api-definition
public event RadTreeView.DragStartedHandler DragStarted

Event Value

RadTreeView.DragStartedHandler

DragStarting

Occurs when a drag operation is about to begin, allowing cancellation of the operation. This event provides an opportunity to prevent certain nodes from being dragged.

Declaration

cs-api-definition
public event RadTreeView.DragStartingHandler DragStarting

Event Value

RadTreeView.DragStartingHandler

Edited

Occurs after a tree node has finished being edited and the changes have been applied. This event provides access to the edited node and the new value.

Declaration

cs-api-definition
public event TreeNodeEditedEventHandler Edited

Event Value

TreeNodeEditedEventHandler

Editing

Occurs before a tree node enters edit mode for text editing. This event allows validation and cancellation of the editing operation.

Declaration

cs-api-definition
public event TreeNodeEditingEventHandler Editing

Event Value

TreeNodeEditingEventHandler

EditorInitialized

Occurs when the active editor for node editing has been initialized. This event allows customization of the editor after it has been created and configured.

Declaration

cs-api-definition
public event TreeNodeEditorInitializedEventHandler EditorInitialized

Event Value

TreeNodeEditorInitializedEventHandler

EditorRequired

Occurs when the tree view requires an editor for node editing operations. This event allows custom editor selection and configuration for different node types.

Declaration

cs-api-definition
[Browsable(true)]
public event RadTreeView.EditorRequiredHandler EditorRequired

Event Value

RadTreeView.EditorRequiredHandler

ItemDrag

Occurs when the user begins dragging a tree node. This event is raised at the start of a drag operation when AllowDragDrop is enabled.

Declaration

cs-api-definition
public event RadTreeView.ItemDragHandler ItemDrag

Event Value

RadTreeView.ItemDragHandler

NodeAdded

Occurs after a tree node has been added to the tree view. This event provides access to the newly added node for initialization or logging purposes.

Declaration

cs-api-definition
[Browsable(true)]
public event RadTreeView.RadTreeViewEventHandler NodeAdded

Event Value

RadTreeView.RadTreeViewEventHandler

NodeAdding

Occurs before a tree node is added to the tree view, allowing cancellation of the operation. This event provides an opportunity to validate or prevent node addition.

Declaration

cs-api-definition
[Browsable(true)]
public event RadTreeView.RadTreeViewCancelEventHandler NodeAdding

Event Value

RadTreeView.RadTreeViewCancelEventHandler

NodeCheckedChanged

Occurs after the checked state of a tree node has changed. This event is raised when CheckBoxes is enabled and a node's check state has been modified.

Declaration

cs-api-definition
public virtual event TreeNodeCheckedEventHandler NodeCheckedChanged

Event Value

TreeNodeCheckedEventHandler

NodeCheckedChanging

Occurs before the checked state of a tree node changes, allowing cancellation of the operation. This event is raised when CheckBoxes is enabled and a node's check state is about to change.

Declaration

cs-api-definition
public virtual event RadTreeView.RadTreeViewCancelEventHandler NodeCheckedChanging

Event Value

RadTreeView.RadTreeViewCancelEventHandler

NodeDataBound

Occurs after a tree node has been bound to a data item during data binding operations. This event allows customization of the node after it has been populated with data.

Declaration

cs-api-definition
[Browsable(true)]
public event RadTreeView.RadTreeViewEventHandler NodeDataBound

Event Value

RadTreeView.RadTreeViewEventHandler

NodeExpandedChanged

Occurs after a tree node has been expanded or collapsed. This event is raised when the expanded state of a node has been successfully changed.

Declaration

cs-api-definition
[Browsable(true)]
public event RadTreeView.TreeViewEventHandler NodeExpandedChanged

Event Value

RadTreeView.TreeViewEventHandler

NodeExpandedChanging

Occurs before a tree node is expanded or collapsed, allowing cancellation of the operation. This event provides an opportunity to validate or prevent expand/collapse actions.

Declaration

cs-api-definition
[Browsable(true)]
public event RadTreeView.RadTreeViewCancelEventHandler NodeExpandedChanging

Event Value

RadTreeView.RadTreeViewCancelEventHandler

NodeFormatting

Occurs when a tree node needs to be formatted for display. This event allows customization of node appearance based on state or data.

Declaration

cs-api-definition
public event TreeNodeFormattingEventHandler NodeFormatting

Event Value

TreeNodeFormattingEventHandler

NodeMouseClick

Occurs when a mouse button is clicked on a tree node. This event provides access to the clicked node and mouse event details.

Declaration

cs-api-definition
public event RadTreeView.TreeViewEventHandler NodeMouseClick

Event Value

RadTreeView.TreeViewEventHandler

NodeMouseDoubleClick

Occurs when a mouse button is double-clicked on a tree node. This event provides access to the double-clicked node and mouse event details.

Declaration

cs-api-definition
public event RadTreeView.TreeViewEventHandler NodeMouseDoubleClick

Event Value

RadTreeView.TreeViewEventHandler

NodeMouseDown

Occurs when the user presses a mouse button while the cursor is over a tree node. This event provides access to the specific node and mouse button information.

Declaration

cs-api-definition
public event RadTreeView.TreeViewMouseEventHandler NodeMouseDown

Event Value

RadTreeView.TreeViewMouseEventHandler

NodeMouseEnter

Occurs when the mouse cursor enters the area of a tree node. This event is useful for implementing custom hover effects or tooltips.

Declaration

cs-api-definition
public event RadTreeView.TreeViewEventHandler NodeMouseEnter

Event Value

RadTreeView.TreeViewEventHandler

NodeMouseHover

Occurs when the mouse cursor hovers over a tree node for an extended period. This event is typically used for displaying detailed tooltips or information.

Declaration

cs-api-definition
public event RadTreeView.TreeViewEventHandler NodeMouseHover

Event Value

RadTreeView.TreeViewEventHandler

NodeMouseLeave

Occurs when the mouse cursor leaves the area of a tree node. This event is useful for cleaning up hover effects or hiding tooltips.

Declaration

cs-api-definition
public event RadTreeView.TreeViewEventHandler NodeMouseLeave

Event Value

RadTreeView.TreeViewEventHandler

NodeMouseMove

Occurs when the user moves the mouse cursor within the area of a tree node. This event provides access to the specific node and mouse position information.

Declaration

cs-api-definition
public event RadTreeView.TreeViewMouseEventHandler NodeMouseMove

Event Value

RadTreeView.TreeViewMouseEventHandler

NodeMouseUp

Occurs when the user releases a mouse button while the cursor is over a tree node. This event provides access to the specific node and mouse button information.

Declaration

cs-api-definition
public event RadTreeView.TreeViewMouseEventHandler NodeMouseUp

Event Value

RadTreeView.TreeViewMouseEventHandler

NodeRemoved

Occurs after a tree node has been removed from the tree view. This event provides access to the removed node for cleanup or logging purposes.

Declaration

cs-api-definition
[Browsable(true)]
public event RadTreeView.RadTreeViewEventHandler NodeRemoved

Event Value

RadTreeView.RadTreeViewEventHandler

NodeRemoving

Occurs before a tree node is removed from the tree view, allowing cancellation of the operation. This event provides an opportunity to validate or prevent node removal.

Declaration

cs-api-definition
[Browsable(true)]
public event RadTreeView.RadTreeViewCancelEventHandler NodeRemoving

Event Value

RadTreeView.RadTreeViewCancelEventHandler

NodesNeeded

Occurs when child nodes need to be loaded in lazy loading mode. This event is raised when LazyMode is enabled and a node is expanded for the first time.

Declaration

cs-api-definition
[Browsable(true)]
public event NodesNeededEventHandler NodesNeeded

Event Value

NodesNeededEventHandler

SelectedNodeChanged

Occurs after a tree node has been selected. This event is raised when the SelectedNode property changes.

Declaration

cs-api-definition
public virtual event RadTreeView.RadTreeViewEventHandler SelectedNodeChanged

Event Value

RadTreeView.RadTreeViewEventHandler

SelectedNodeChanging

Occurs before a tree node selection changes, allowing cancellation of the selection. This event provides an opportunity to validate and potentially prevent node selection.

Declaration

cs-api-definition
public virtual event RadTreeView.RadTreeViewCancelEventHandler SelectedNodeChanging

Event Value

RadTreeView.RadTreeViewCancelEventHandler

SelectedNodesChanged

Occurs when the SelectedNodes collection has been modified. This event is raised when nodes are added to or removed from the selection.

Declaration

cs-api-definition
public virtual event EventHandler<RadTreeViewEventArgs> SelectedNodesChanged

Event Value

EventHandler<RadTreeViewEventArgs>

SelectedNodesCleared

Occurs when all selected nodes have been cleared from the SelectedNodes collection. This event is raised when the selection is programmatically or interactively cleared.

Declaration

cs-api-definition
public virtual event EventHandler SelectedNodesCleared

Event Value

EventHandler

ShowExpander

Occurs when the tree view needs to determine whether to show an expander for a node in lazy loading mode. This event is raised when LazyMode is enabled and the control needs to display expand indicators.

Declaration

cs-api-definition
public event RadTreeView.TreeViewShowExpanderEventHandler ShowExpander

Event Value

RadTreeView.TreeViewShowExpanderEventHandler

ValidationError

Occurs when editor validation fails during the node editing process. This event is raised when the entered value does not meet validation criteria.

Declaration

cs-api-definition
[Browsable(true)]
public event EventHandler ValidationError

Event Value

EventHandler

ValueChanged

Occurs when the editor has finished editing and the new value has been committed. This event is raised after the node value has been successfully changed.

Declaration

cs-api-definition
[Browsable(true)]
public event TreeNodeValueChangedEventHandler ValueChanged

Event Value

TreeNodeValueChangedEventHandler

ValueChanging

Occurs when the editor value is in the process of being changed during node editing. This event allows validation and modification of the value before it is committed.

Declaration

cs-api-definition
public event TreeNodeValueChangingEventHandler ValueChanging

Event Value

TreeNodeValueChangingEventHandler

ValueValidating

Occurs when the editor value is being validated during the editing process. This event allows custom validation logic and can prevent invalid values from being accepted.

Declaration

cs-api-definition
[Browsable(true)]
public event TreeNodeValidatingEventHandler ValueValidating

Event Value

TreeNodeValidatingEventHandler

In this article
DefinitionConstructorsRadTreeView()PropertiesActiveEditorAllowAddAllowArbitraryItemHeightAllowDefaultContextMenuAllowDragDropAllowEditAllowPlusMinusAnimationAllowRemoveAutoCheckChildNodesAutoScrollCheckBoxesCheckedMemberCheckedNodesChildMemberContextMenuStripDataMemberDataSourceDefaultSizeDisplayMemberDropHintColorEnableDeferredScrollingEnableKineticScrollingEnableUIAutomationExpandAnimationExpandModeFilterFilterDescriptorsFindStringComparerFullRowSelectHScrollBarHideSelectionHotTrackingImageIndexImageKeyIsEditingItemHeightKeyboardSearchEnabledKeyboardSearchResetIntervalLazyModeLineColorLineStyleLineWidthMultiSelectNodesParentMemberPathSeparatorPlusMinusAnimationStepRadContextMenuRelationBindingsSelectedNodeSelectedNodesShowDragHintShowDropHintShowExpandCollapseShowLinesShowNodeToolTipsShowRootLinesSortDescriptorsSortOrderSpacingBetweenNodesToggleModeToggleStateConverterTopNodeTreeIndentTreeViewElementTreeViewXmlTriStateModeVScrollBarValueMemberVisibleCountMethodsAddNodeByPath(string)AddNodeByPath(string, string)BeginEdit()BeginInit()BeginUpdate()BringIntoView(RadTreeNode)CancelEdit()ClearSelection()CollapseAll()CollapseAll(RadTreeNodeCollection)CreateAccessibilityInstance()CreateChildItems(RadElement)CreateTreeViewElement()DeferRefresh()Dispose(bool)EndEdit()EndInit()EndUpdate()Execute(ICommand, params object[])Execute(bool, ICommand, params object[])ExecuteBatchCommand(RadTreeNode, int, ICommand, params object[])ExecuteBatchCommand(RadTreeNodeCollection, int, ICommand, params object[])ExecuteScalarCommand(RadTreeNode, int, ICommand, params object[])ExpandAll()ExpandAll(RadTreeNodeCollection)Find(Predicate<RadTreeNode>)Find(string)Find<T>(FindAction<T>, T)FindNodes(Predicate<RadTreeNode>)FindNodes(string)FindNodes<T>(FindAction<T>, T)ForEach(Action<RadTreeNode>)GetNodeAt(Point)GetNodeAt(int, int)GetNodeByName(string)GetNodeByName(string, RadTreeNode)GetNodeByPath(string)GetNodeByPath(string, string)GetNodeCount(bool)IsInputKey(Keys)LoadXML(Stream, params Type[])LoadXML(string, params Type[])LoadXMLWithReader(XmlReader, params Type[])OnBindingContextChanged(EventArgs)OnClick(EventArgs)OnGotFocus(EventArgs)OnKeyDown(KeyEventArgs)OnKeyPress(KeyPressEventArgs)OnLoad(Size)OnLostFocus(EventArgs)OnMouseClick(MouseEventArgs)OnMouseDoubleClick(MouseEventArgs)OnMouseDown(MouseEventArgs)OnMouseEnter(EventArgs)OnMouseLeave(EventArgs)OnMouseMove(MouseEventArgs)OnMouseUp(MouseEventArgs)OnMouseWheel(MouseEventArgs)OnNotifyPropertyChanged(PropertyChangedEventArgs)OnThemeNameChanged(ThemeNameChangedEventArgs)ProcessCodedUIMessage(ref IPCMessage)SaveXML(Stream, params Type[])SaveXML(string, params Type[])SaveXMLWithWriter(TextWriter, params Type[])SelectAll()SetError(string, RadTreeNode)ToString()UnwireEvents()WireEvents()WndProc(ref Message)EventsContextMenuOpeningCreateNodeCreateNodeElementDataErrorDragEndedDragEndingDragOverNodeDragStartedDragStartingEditedEditingEditorInitializedEditorRequiredItemDragNodeAddedNodeAddingNodeCheckedChangedNodeCheckedChangingNodeDataBoundNodeExpandedChangedNodeExpandedChangingNodeFormattingNodeMouseClickNodeMouseDoubleClickNodeMouseDownNodeMouseEnterNodeMouseHoverNodeMouseLeaveNodeMouseMoveNodeMouseUpNodeRemovedNodeRemovingNodesNeededSelectedNodeChangedSelectedNodeChangingSelectedNodesChangedSelectedNodesClearedShowExpanderValidationErrorValueChangedValueChangingValueValidating
Not finding the help you need?
Contact Support