New to Telerik UI for WinForms? Download free 30-day trial

Scrolling Nodes

When the nodes in RadTreeView can't fit in the container, a vertical scroll bar appears so that they can be scrolled and later selected. The EnableMouseWheel property controls whether the scrolling behavior is enabled. By default, its value is set to true and the nodes can be scrolled by using the mouse wheel.

Scrolling Modes

The TreeViewElement supports three types of ScrollModes:

  • Discrete: Defines scrolling by only one item at a time.

  • Smooth: Sets scrolling by pixel, meaning that an item can be partially visible.

  • Deferred: Does not cause GUI updates until the user finishes the scrolling operation. A tooltip is shown indicating the position to which the view will scroll to.

Figure 3: Discrete Scrolling

WinForms RadTreeView Discrete Scrolling

Discrete Scrolling

this.radTreeView1.TreeViewElement.Scroller.ScrollMode = ItemScrollerScrollModes.Discrete;

Figure 4: Smooth Scrolling

WinForms RadTreeView Smooth Scrolling

Smooth Scrolling

this.radTreeView1.TreeViewElement.Scroller.ScrollMode = ItemScrollerScrollModes.Smooth;

Figure 5: Deferred Scrolling

WinForms RadTreeView Deferred Scrolling

Deferred Scrolling

this.radTreeView1.TreeViewElement.Scroller.ScrollMode = ItemScrollerScrollModes.Deferred;

KineticScrolling

This feature ensures that the control is ready for modern touch-screen applications. It can be attached by simply setting the EnableKineticScrolling to true.

Figure 1: Enable Kinetic Scrolling

WinForms RadTreeView Enable Kinetic Scrolling

Enabling Kinetic Scrolling

this.radTreeView1.EnableKineticScrolling = true;

Programmatically Scrolling

RadTreeView provides out of the box functionality for programmatically scrolling its content. The available method is ScrollToItem which scrolls to a specific item.

Figure 2: Scroll to Item

WinForms RadTreeView Scroll to Item

Scroll to Item

RadTreeNode lastRootNode = this.radTreeView1.TreeViewElement.Nodes[radTreeView1.Nodes.Count - 1];
this.radTreeView1.TreeViewElement.Scroller.ScrollToItem(lastRootNode);