asp.net.ph

Skip Navigation Links

Responding to TreeView Node Events

Controls You Can Use on Web Forms   ASP.NET Navigation Controls   TreeView Control


The TreeView control provides several events that you can program against. This allows you to run a custom routine whenever an event occurs.

NOTE: TreeView control events are raised only when a user interacts with the control, such as when selecting, expanding, or collapsing a node. These events are not raised if the select, expand, or collapse methods are called programmatically.

The following table lists the events supported by the TreeView control.

Event Description
SelectedNodeChanged Occurs when a node is selected in the TreeView control.
TreeNodeCheckChanged Occurs when a check box in the TreeView control changes state between posts to the server. Occurs once for every TreeNode object that changes.
TreeNodeCollapsed Occurs when a node is collapsed in the TreeView control.
TreeNodeDataBound Occurs when a data item is bound to a node in the TreeView control.
TreeNodeExpanded Occurs when a node is expanded in the TreeView control.
TreeNodePopulate Occurs when a node, with its PopulateOnDemand property set to true, is expanded in the TreeView control.

See Also

Binding a TreeView Control to a Data Source   Web Forms Events and Handlers



© 2025 Reynald Nuñez and asp.net.ph. All rights reserved.

If you have any question, comment or suggestion
about this site, please send us a note