THEMES
THEME SETTINGS

Navigation and Layout - NavBar Data Binding to XML

This demo illustrates how the BindToXML method can be used to easily populate the DevExpress MVC Navigation Bar with group and item information taken from an xml file. The xml file has the following structure:

<Cameras>
    <Brand Text="...">
        <Camera Model="..." Pixels="..." NavigateUrl="..." ImageUrl="..." />
        ...
    </Brand>
    ...
</Cameras>

The MVC NavBar is able to automatically retrieve group and item information by binding to data fields whose names coincide with property names of a group and item objects (such as the Text, NavigateUrl, ImageUrl and ToolTip). In this demo, the group text, and both the navigation location and image path of items are obtained automatically from the corresponding attributes of data source nodes. The texts used for individual items are composed dynamically by concatenating the values of the Model and Pixels attributes. This processing is performed within a delegate of the ItemDataBound method, which allows you to manipulate values being assigned to the properties of a NavBar item during data binding.

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.