Show theme settings Shopping cart Download trialFree Trial
Change Theme Settings
Change Theme Settings
Themes
 
Show All Themes
v
...v

Virtual Mode

  • Expand
    Accessibility
  • Expand
    CloudControl
  • Expand
    Code
  • Expand
    Content
  • Expand
    FloatingActionButton
  • Expand
    FormLayout
  • Expand
    Menu
  • Expand
    My Project
  • Expand
    NavBar
  • Expand
    Panel
  • Expand
    Ribbon
  • Expand
    Scripts
  • Expand
    SiteMap
  • Expand
    Splitter
  • Expand
    TabControl
  • Expand
    TitleIndex
  • Expand
    TreeView
  • Expand
    UserControls
  • Default.aspx
  • DeviceViewer.master.cs
  • DeviceViewer.master.designer.cs
  • DeviceViewer.master.designer.vb
  • DeviceViewer.master.vb
  • Error404.aspx
  • Error404.aspx.designer.cs
  • Error404.aspx.designer.vb
  • Error500.aspx
  • Error500.aspx.designer.cs
  • Error500.aspx.designer.vb
  • Global.asax
  • Global.asax.cs
  • Global.asax.vb
  • PrecompiledApp.config
  • Web.config

This demo shows how Virtual Mode helps you improve tree view performance.

In addition to bound and unbound modes, the ASPxTreeView supports Virtual Mode. This mode significantly reduces server load and startup time when you work with complex or dynamically generated hierarchies. In Virtual Mode, the control retrieves data from the server in portions: at startup and when users expand nodes. Child nodes are created and initialized only when their parent node is expanded for the first time. This approach improves server resource usage and removes the need to load the entire hierarchy upfront.

To activate Virtual Mode for the ASPxTreeView, handle its VirtualModeCreateChildren event, which occurs when expanding nodes for the first time. Within 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 IsLeaf property to true, to not show the expand button for this node.

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

Collapse/Expand
Local Copy of this Demo
To inspect the source code for this demo on your machine, you must first install our components via the DevExpress Component Installer.
You can open a local copy of this online demo directly from this webpage (if using v20.2.8, 21.1.4 or higher).
Open CS Solution
Open VB Solution
The source code files for this demo are installed (by default) in the following directories:
\Users\Public\Documents\DevExpress Demos XX.X\Components\ASP.NET\CS\ASPxNavigationAndLayoutDemos
\Users\Public\Documents\DevExpress Demos XX.X\Components\ASP.NET\VB\ASPxNavigationAndLayoutDemos