Change Theme Settings
Change Theme Settings
Themes
 
Show All Themes
v
...v

Virtual Mode

  • Expand
    Code
  • Expand
    Content
  • Expand
    Controllers
  • Expand
    Models
  • Expand
    Scripts
  • Expand
    Views
  • Global.asax
  • Global.asax.cs
  • gulpfile.js
  • package.json
  • packages.config
  • PrecompiledApp.config
  • Web.config


In addition to bound and unbound modes, the TreeView extension can operate in a Virtual Mode, which greatly reduces both the server load and start-up time when working with complex or dynamically created data. In a virtual mode, a tree is created on demand. In this instance, child nodes are created and initialized when their parent node is expanded.

To implement a virtual mode for the TreeView extension, you should use a specifically parameterized BindToVirtualData method. The method's parameter refers to the delegate method that can be declared as a static method within a model class. Within this delegate method, create a list of business objects that correspond to the child nodes owned by the processed node.

In this demo, the TreeView extension uses this data binding method to display the file/folder tree of this demo's website.

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
The source code files for this demo are installed (by default) in the following directory:
\Users\Public\Documents\DevExpress Demos XX.X\Components\ASP.NET\CS\MVCxNavigationAndLayoutDemos