By using the API of the
RadTreeView
control you can easily disable or enable a node. You can set the boolean property
IsEnabled
to each one of the following objects:
RadTreeView
RadTreeViewItem
This tutorial will walk you through the common tasks of
enabling
and
disabling
treeview item(s) declaratively and programmatically.
By default all items in the treeview are enabled (their
IsEnabled
property is set to
True
). That means you can select, expand, collapse, drag and drop these items. If you want to disable a specific item, just add the following attribute to the treeview item declaration:
<telerik:RadTreeViewItem IsEnabled="False"/>
If you want to disable the whole treeview then add the same attribute to the treeview declaration. On the next snapshot the whole treeview is disabled.
Here is the XAML declaration. Note that if you set the
IsEnabled
property to
False
for the
RadTreeView
object then all treeview items will be disabled.
Private Sub DisableTreeView()
radTreeView.IsEnabled = False
End Sub
Consider disabling treeview items in XAML instead of code-behind whenever it's possible. This includes situations when you know what items you need to disable at design time.
Progress, Telerik, and certain product names used herein are trademarks or registered trademarks of Progress Software Corporation and/or one of its subsidiaries or affiliates in the U.S. and/or other countries. See
Trademarks
for appropriate markings.