Change Theme Settings
Change Theme Settings
Show All Themes

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:

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

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.