[Expand]General Information
[Expand]WinForms Controls
[Collapse]ASP.NET Controls and MVC Extensions
 [Expand]Prerequisites
 [Expand]What's Installed
 [Expand]Common Concepts
 [Collapse]ASP.NET WebForms Controls
   Getting Started
  [Expand]Grid View
  [Expand]Tree List
  [Expand]Card View
  [Expand]Reporting
  [Expand]Chart Control
  [Expand]Pivot Grid
  [Expand]Spreadsheet
  [Expand]Rich Text Editor
  [Expand]Scheduler
  [Collapse]Site Navigation and Layout
   [Expand]Product Information
   [Expand]Form Layout
   [Expand]Menu
   [Expand]Navigation Bar
   [Collapse]Page Control and Tab Control
     ASPxTabControl Overview
    [Expand]Concepts
    [Expand]Visual Elements
    [Collapse]Examples
      TabControl - Data Binding to an XML file via property settings
      TabControl - Automatic Data Binding to an XML file
    Panel Overview
   [Expand]Ribbon
   [Expand]Site Map Control
   [Expand]Splitter
   [Expand]Tag Cloud Control
   [Expand]Title Index
   [Expand]TreeView
  [Expand]HTML Editor
  [Expand]Gauges
  [Expand]Vertical Grid
  [Expand]Data Editors
  [Expand]Docking and Popups
  [Expand]File Management
  [Expand]Data and Image Navigation
  [Expand]Multi-Use Site Controls
  [Expand]Spell Checker
  [Expand]Query Builder
 [Expand]ASP.NET MVC Extensions
 [Expand]Localization
 [Expand]Redistribution and Deployment
  Get More Help
 [Expand]API Reference
[Expand]ASP.NET Bootstrap Controls
[Expand]ASP.NET Core Bootstrap Controls
[Expand]WPF Controls
[Expand]Xamarin Controls
[Expand]Windows 10 App Controls
[Expand]Office File API
[Expand]Reporting
[Expand]Report and Dashboard Server
[Expand]Dashboard
[Expand]eXpressApp Framework
[Expand]CodeRush
[Expand]CodeRush Classic
[Expand]Cross-Platform Core Libraries
[Expand]Tools and Utilities
 End-User Documentation

TabControl - Automatic Data Binding to an XML file

Show Me

A complete sample project is available in the DevExpress Code Examples database at http://www.devexpress.com/example=E2221.

This sample demonstrates how to bind the ASPxTabControl to data without manually setting the control's data-related properties.

The ASPxTabControl's data source is set to an XmlDataSource component that is used to retrieve data from an XML file. The XmlDataSource's XPath property is defined explicitly.

Based on the source data, the ASPxTabControl populates its Tabs collection with automatically created Tab objects. Tab object characteristics (such as text, image, navigate location, tooltip text, etc.) are obtained from the XML file's node attributes.

This example demonstrates the ASPxTabControl's ability to automatically retrieve tab characteristics from node attributes whose names coincide with property names of a Tab object. For this purpose, node attributes are named as ActiveTabImageUrl, Name, NavigateUrl, TabImageUrl, Text and ToolTip in this demo. Note that the name match is not case sensitive.

Is this topic helpful?​​​​​​​