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

AJAX



This sample demonstrates the use of the AJAX-based callbacks implemented by the DevExpress MVC TreeView.

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 use of callbacks, the TreeViews's 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.

In this example, we momentarily pause callback processing on the server side, so that the Loading Panel is visible during processing.

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