Log In
[Expand]Welcome to DevExpress .NET Documentation
[Expand]WinForms Controls
[Collapse]ASP.NET Controls and MVC Extensions
 [Expand]What's Installed
 [Expand]Common Concepts
 [Collapse]ASP.NET WebForms Controls
   Getting Started
  [Expand]Chart Control
  [Expand]Grid View
  [Expand]Card View
  [Expand]Vertical Grid
  [Expand]Rich Text Editor
  [Expand]Image and Data Browsing
  [Expand]Docking and Popups
  [Collapse]Site Navigation and Layout
   [Expand]Product Information
   [Expand]Form Layout
   [Expand]Navigation Bar
   [Expand]Page Control and Tab Control
    Panel Overview
   [Expand]Site Map Control
   [Expand]Tag Cloud Control
   [Expand]Title Index
     ASPxTreeView Overview
    [Expand]Visual Elements
      How to: Create Nodes in Code
      How to: Find a Node by Its Text
      How to: Prohibit Collapsing Nodes
      How to: Manage The Visibility of Check Boxes
      How to: Create Templates
    [Expand]Member Tables
    [Expand]ASPxTreeView - Animated Images
  [Expand]File Management
  [Expand]Multi-Use Site Controls
  [Expand]HTML Editor
  [Expand]Pivot Grid
  [Expand]Tree List
  [Expand]Data Editors
  [Expand]Spell Checker
  [Expand]Query Builder
 [Expand]ASP.NET MVC Extensions
 [Expand]Redistribution and Deployment
  Get More Help
 [Expand]API Reference
[Expand]ASP.NET Bootstrap Controls
[Expand]ASP.NET Core Bootstrap Controls
[Expand]WPF Controls
[Expand]Xamarin Controls
[Expand]Windows 10 App Controls
[Expand]Document Server
[Expand]Report Server
[Expand]eXpressApp Framework
[Expand]CodeRush Classic
[Expand]Cross-Platform Core Libraries
[Expand]Tools and Utilities
 End-User Documentation

How to: Prohibit Collapsing Nodes

Show Me

A complete sample project is available in the DevExpress Code Examples database at http://www.devexpress.com/example=E2439.

The sample code below represents an ASPxTreeView.ExpandedChanging event handler. The event handler prevents collapsing nodes if it has selected children in any generation.

Is this topic helpful?​​​​​​​