Free Trial Buy Now

Tab Strip - Data Binding to XML

Description

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

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

MVC Tab Extension provides the following binding methods:

  • Bind(object dataObject);
  • BindToSiteMap(string fileName);
  • BindToSiteMap(string fileName, bool showStartingNode);
  • BindToXML(string fileName);
  • BindToXML(string fileName, string xPath);

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.

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.