Free Trial Buy Now

NavBar - Data Binding to XML

Description

This demo illustrates how the BindToXML method can be used to easily populate the DevExpress MVC NavBar 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: v2012 vol 2.8
Experience the DevExpress Difference Today
Demos with source code are included with an installation of DevExpress controls for ASP.NET. Refer to the Demos and Sample Applications topic to learn more.
To download your free evaluation copy of our award-winning ASP.NET libraries, visit the Downloads page
All DevExpress MVC Extensions ship as part of DXperience ASP.NET, Enterprise, and Universal.
To obtain pricing information, visit the Pricing Options page or contact us via Email at info@devexpress.com
or by telephone at +1 (818) 844-3383 between 8:30am and 5pm Pacific Time.