Advanced User Interface Controls and Components

How Nodes Can Remain Expanded or Collapsed in TreeView .NET

By default all nodes can become expanded or collapsed. There are some cases when you want to keep specific node locked and prevent it from expanding or collapsing.

Node locked and remain expanded only in TreeView

Lock Status - Expanded

Node locked and remain collapsed only in TreeView

Lock Status - Collapsed

This can be done by using the LockStatus property which can have the following values:

  • None - node is free to expand or collapse
  • Expanded - node remains expanded
  • Collapsed - node remains collapsed

By setting the node lock status to expanded or collapsed, the node expand box icon will change showing that the node is locked. The appearance of this icon depends on current visual style settings.

Download IntegralUI TreeView