THEMES
THEME SETTINGS

Navigation and Layout - TreeView Data Binding to XML

This demo illustrates how the BindToXML method can be used to populate the DevExpress MVC TreeView with node information taken from an xml file. The source XML file contains hierarchical information about a set of classes and their members (properties, methods, events).

The MVC TreeView ships with the following data binding methods:

TreeView implements specific properties that point to the data fields containing necessary data. These are the TextField, ImageUrlField, NavigateUrlField, NameField and ToolTipField properties. If these properties are not defined, the TreeView is able to automatically bind to data fields whose names coincide with property names of a MVCxTreeViewNode object (such as the Text, ImageUrl, NavigateUrl, Name and ToolTip).

In this demo, the TextField, ImageUrlField, and NavigateUrlField properties are used to specify the names of data item attributes from which corresponding node settings are obtained. The NodeDataBound property is used to define a delegated method, changing the text style of nodes which represent classes (text is displayed in bold).

Version: v2016 vol 2.5
Copyright © 2006-2017 Developer Express Inc
Your Next Great MVC App Starts Here

Get started today and download your 30-day trial of DevExpress MVC Extensions (includes 30 days of free technical support).

All demos ship with full source code and are included in the DevExpress MVC distribution. Refer to the Demos and Sample Applications topic to learn more.

DevExpress MVC Extensions ship as part of DevExpress Universal, DXperience and ASP.NET Subscriptions and are backed by a 60 day unconditional money-back guarantee.
To learn more and obtain pricing information, visit the Compare Features and Pricing webpage. For immediate assistance, contact us by Email at info@devexpress.com or by phone at +1 (818) 844-3383 between 7:30am and 4:30pm Pacific Time.