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
 [Expand]ASP.NET WebForms Controls
 [Collapse]ASP.NET MVC Extensions
  [Expand]Product Information
  [Expand]Getting Started
  [Expand]Common Concepts
  [Expand]Grid View
  [Expand]Card View
  [Expand]Vertical Grid
  [Expand]Spreadsheet
  [Expand]Rich Text Editor
  [Expand]HTML Editor
  [Expand]Image and Data Browsing
  [Expand]Docking and Popups
  [Collapse]Navigation and Layout Extensions
   [Expand]FormLayout
   [Expand]Menu
   [Expand]NavBar
   [Expand]Ribbon
   [Expand]PageControl
   [Expand]TabControl
   [Expand]PopupMenu
   [Expand]Splitter
   [Collapse]TreeView
     Overview - TreeView
    [Collapse]Concepts
      Node
     [Expand]Binding to Data
      Expanding and Collapsing Nodes
      Animation Effect
      Selection
      Node Link Mode
      Check Box Support
      Callbacks
      Templates
    [Expand]Visual Elements
   [Expand]Panel
  [Expand]File Management
  [Expand]Multi-Use Site Extensions
  [Expand]Charts
  [Expand]Pivot Grid
  [Expand]Scheduler
  [Expand]Tree List
  [Expand]Data Editor Extensions
  [Expand]Report Extensions
  [Expand]SpellChecker
 [Expand]Localization
 [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]Reporting
[Expand]Report Server
[Expand]Dashboard
[Expand]eXpressApp Framework
[Expand]CodeRush
[Expand]CodeRush Classic
[Expand]Cross-Platform Core Libraries
[Expand]Tools and Utilities
 End-User Documentation

Callbacks

The MVC TreeView supports AJAX with the ability to load the content of parent nodes from the server via callbacks. This approach allows the TreeView to avoid the initial transfer of all node data to the client, thus improving page load times.

In order to activate the use of callbacks, the TreeViews's TreeViewSettings.CallbackRouteValues property should contain the path to an action that handles a callback request. The best way to handle such callbacks is to use a partial view that only contains a TreeView. In this instance, the contents of the collapsed nodes are not represented on the client. When a parent node is expanded for the first time, its content is retrieved from the server and then cached on the client. The next time the node is expanded, its content is taken from the client and no callback to the server is performed.

Expanded Examples

The sample below demonstrates the use of the AJAX-based callbacks implemented by the MVC TreeView. The callback processing is paused on the server side, so that the Loading Panel is visible during processing.

Controller code:

View code (ASPX):

View code (Razor):

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