Show theme settings Shopping cart Download trialFree Trial
Change Theme Settings
Change Theme Settings
Themes
 
Show All Themes
v
...v

Data Binding to XML



This demo illustrates how the BindToXML method can be used to populate the DevExpress MVC TabControl extension with information taken from an xml file. The xml file has the following structure:

<Products>
    <Product name="..." text="..." id="..." />
    ...
</Products>

MVC TabControl extension provides the following binding methods:

The MVC Tab extension implements specific properties that point to the data fields containing the necessary data. These are the NameField, NavigateUrlField, TabImageUrlField, ActiveTabImageUrlField, TextField and ToolTipField properties. If these properties are not defined, the MVC Tab extension is able to automatically bind to data fields whose names coincide with property names of a tab object (such as the Name, NavigateUrl, TabImageUrl, ActiveTabImageUrl, Text and ToolTip).

In this demo, tab navigation locations are generated by formatting values of the 'id' data field. The 'id' data field is specified by the NavigateUrlField property, and a format string is defined via the NavigateUrlFormatString property.

Collapse/Expand
Local Copy of this Demo
To inspect the source code for this demo on your machine, you must first install our components via the DevExpress Component Installer.
You can open a local copy of this online demo directly from this webpage (if using v20.2.8, 21.1.4 or higher).
Open CS Solution
The source code files for this demo are installed (by default) in the following directory:
\Users\Public\Documents\DevExpress Demos XX.X\Components\ASP.NET\CS\MVCxNavigationAndLayoutDemos