Free Trial Buy Now

Menu - Data Binding to SiteMap

Group A>
Group B>
Group C>
Group D>
Group E>
Group F>
Group G>
Group H>

Description

This demo illustrates how the BindToSiteMap method can be used to easily populate the Menu for ASP.NET MVC with item information taken from a SiteMap file.

Note that the Menu for ASP.NET MVC is able to automatically retrieve item information by binding to data fields whose names coincide with property names of an item object (such as the Text, NavigateUrl, ImageUrl and ToolTip). In this demo, the image path of items is obtained automatically from the corresponding attributes of data source nodes. The texts and navigation locations of items are retrieved from the standard attributes of a SiteMap file - the 'url' and 'title'. The texts of items of the last nested level are composed dynamically, by concatenating the values of the 'result' and 'title' attributes. This processing is performed within a delegate of the ItemDataBound method, which allows you to manipulate the values being assigned to the properties of a menu item during its 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.