Log In
Home
Support
Demos
Documentation
Blogs
Training
Webinars
[Expand]General Information
[Expand]WinForms Controls
[Collapse]ASP.NET Controls and MVC Extensions
 [Expand]Prerequisites
 [Expand]What's Installed
 [Expand]Common Concepts
 [Collapse]ASP.NET WebForms Controls
  [Expand]Reporting
  [Expand]Chart Control
  [Expand]Grid View
  [Expand]Card View
  [Expand]Vertical Grid
  [Expand]Spreadsheet
  [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]Menu
   [Expand]Navigation Bar
   [Expand]Page Control and Tab Control
    Panel Overview
   [Expand]Ribbon
   [Expand]Site Map Control
   [Expand]Splitter
   [Expand]Tag Cloud Control
   [Expand]Title Index
   [Collapse]TreeView
     ASPxTreeView Overview
    [Collapse]Concepts
      Node
     [Collapse]Binding to Data
       Binding to Data Overview
       Data Binding Using Mapping Properties
       Automatic Data Binding
       Using Data Binding Events
      [Expand]Unbound Mode
       Virtual Mode
      Expanding and Collapsing Nodes
      Animation Effect
      Selection
      NodeLinkMode
      Check Box Support
      Callbacks
      Templates
    [Expand]Visual Elements
    [Expand]Examples
    [Expand]Member Tables
    [Expand]ASPxTreeView - Animated Images
  [Expand]File Management
  [Expand]Multi-Use Site Controls
  [Expand]Scheduler
  [Expand]HTML Editor
  [Expand]Pivot Grid
  [Expand]Tree List
  [Expand]Gauges
  [Expand]Data Editors
  [Expand]Spell Checker
  [Expand]Query Builder
 [Expand]ASP.NET MVC Extensions
 [Expand]Localization
 [Expand]Redistribution and Deployment
  Get More Help
 [Expand]API Reference
[Expand]ASP.NET Bootstrap Controls
[Expand]WPF Controls
[Expand]Xamarin Controls
[Expand]Windows 10 App Controls
[Expand]Document Server
[Expand]Reporting
[Expand]Report Server
[Expand]Dashboard
[Expand]eXpressApp Framework
[Expand]CodeRush
[Expand]Cross-Platform Core Libraries
[Expand]Tools and Utilities
 End-User Documentation

Virtual Mode

In addition to bound and unbound modes, the ASPxTreeView can operate in Virtual Mode, which greatly reduces both the server load and start-up time when working with complex or dynamically created hierarchies. In Virtual Mode, data is retrieved on the server in portions, on a client request, at start-up, and when expanding nodes. In essence, child nodes are not created and initialized until their parent node is expanded for the first time. This allows you to efficiently use server resources and to avoid retrieving all the hierarchical data for the ASPxTreeView.

To activate Virtual Mode for the ASPxTreeView, handle its ASPxTreeView.VirtualModeCreateChildren event, which occurs when expanding nodes for the first time. In the event handler, you need to create a list of TreeViewVirtualNode objects representing child nodes for the currently expanded node. If a child node has no children, set its TreeViewVirtualNode.IsLeaf property to true, to prevent the display of the expand button for this node.

Note

The ASPxTreeView.SyncSelectionMode property affects the ASPxTreeView control behavior in virtual mode.

Expanded Examples

Show Me

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

In this demo, the ASPxTreeView uses Virtual Mode to display the file/folder tree of the demo's web site.

Expanded See Also

How would you rate this topic?​​​​​​​