Free Trial Buy Now

NavBar - Data Binding

Canon
Canon
Canon EOS 400D
10.1 million pixels
Canon EOS 30D
8.2 million pixels
Canon EOS-1D Mark II N
8.2 million pixels
Canon EOS 5D
12.7 million pixels
Canon EOS 350D
8.0 million pixels
Canon EOS-1Ds Mark II
16.6 million pixels
Nikon
Nikon
Nikon D80
10.0 million pixels
Nikon D2Xs
12.2 million pixels
Nikon D200
10.0 million pixels
Nikon D70s
6.0 million pixels
Nikon D50
6.0 million pixels
Olympus
Olympus
Olympus E-400
10.0 million pixels
Olympus E-330
7.4 million pixels
Olympus E-500
8.0 million pixels
Olympus E-300
8.0 million pixels
Sony
Sony
Sony DSLR-A100
10.0 million pixels
Pentax
Pentax
Pentax K10D
10.0 million pixels
Pentax K100D
6.1 million pixels
Pentax *ist DL2
6.1 million pixels
Filter:
v
XPath: /Cameras/*

Description

This demo illustrates how you can bind the ASPxNavBar to a data source. The ASPxNavBar control supports standard data binding. In this instance any object which implements the IHierarchicalEnumerable or IHierarchicalDataSource interface (e.g. SiteMapDataSource, XmlDataSource) may be used as a data source for this control.

In this demo, the navbar control is bound to a standard data source of the type XmlDataSource. This data source supplies the navbar with data from a specific NavBarCameras.xml file. The ASPxNavBar requires data to be represented as different navbar items combined into groups. Use the data source's XPath property to obtain the desired sample of data. (See ASPX code)

Note that the text within each navbar item is composed by using the navbar's template of the type ItemTextTemplate.

Our web controls provide you the ability to bind the properties of the controls that compose a template directly to the properties of the corresponding data object (DataItem) from the bound data source. For this purpose, the Container.Item.DataItem property or the Container.EvalDataItem(<expression>) method can be used. Refer to ASPX code to see how the properties of child controls which populate the navbar's template of the ItemTextTemplate type are bound directly to the specific data of the XmlDataSource's node by using the Container.EvalDataItem(<expression>) method.

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 ASP.NET Controls 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.