[Expand]General Information
[Expand]WinForms Controls
[Collapse]ASP.NET Controls and MVC Extensions
 [Expand]What's Installed
 [Expand]Common Concepts
 [Expand]ASP.NET WebForms Controls
 [Collapse]ASP.NET MVC Extensions
  [Expand]Product Information
  [Expand]Getting Started
  [Expand]Common Concepts
  [Expand]Grid View
  [Expand]Tree List
  [Expand]Card View
  [Expand]Pivot Grid
  [Expand]Rich Text Editor
  [Collapse]Site Navigation and Layout
     Overview - TabControl
     [Collapse]Binding to Data
       Binding to Data Overview
       Data Binding Using Mapping Properties
       Automatic Data Binding
       Unbound Mode
      Tab Layout Customization
    [Expand]Visual Elements
  [Expand]HTML Editor
  [Expand]Vertical Grid
  [Expand]Data Editors Extensions
  [Expand]Docking and Popups
  [Expand]File Management
  [Expand]Data and Image Navigation
  [Expand]Multi-Use Site Extensions
  [Expand]Query Builder
 [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]Report and Dashboard Server
[Expand]eXpressApp Framework
[Expand]CodeRush Classic
[Expand]Cross-Platform Core Libraries
[Expand]Tools and Utilities
 End-User Documentation

Automatic Data Binding

TabControl has a built-in ability to automatically retrieve data from a data source that supports the IHierarchicalEnumerable or IHierarchicalDataSource interface. This topic describes the conditions that allow a TabControl to bind automatically.

TabControl can recognize data items and retrieve some tab characteristics from data fields named in a specific way. If however, any of the data-related properties of a TabControl have been set, then the mapping of the associated MVCxTab object properties will proceed according to Data Binding Using Mapping Properties.

Expanded Data fields and tab properties name match

During binding, a TabControl implements its automatic binding ability by retrieving item characteristics from those data fields whose names coincide with certain property names of an MVCxTab object. The tables below list the names of the object properties that can be mapped during automatic binding, and the matching data field names you should use in the data source for mapping to work.

Tab properties that can be set automatically

Data field names

MVCxTab.ActiveTabImage.Url ActiveTabImageUrl
MVCxTab.Name Name
MVCxTab.NavigateUrl NavigateUrl
MVCxTab.TabImage.Url TabImageUrl
MVCxTab.Text Text
MVCxTab.ToolTip ToolTip

The following image illustrates the process of data retrieval during automatic binding to a particular type of a data source - XmlDataSource.

Expanded Binding to a Site Map

Since the properties of a System.Web.SiteMapNode object have specific names, a TabControl is designed to automatically bind to a Site Map source with node attributes with similar names. In the binding process, corresponding properties of individual tab objects are automatically associated with these item attributes, and mapped accordingly. See the table below for name correspondence.

Site Map node attributes

Corresponding tab object properties

System.Web.SiteMapNode.Title MVCxTab.Text
System.Web.SiteMapNode.Url MVCxTab.NavigateUrl
System.Web.SiteMapNode.Description MVCxTab.ToolTip

The structure of a Site Map allows some flexibility in the naming of item attributes. After TabControl detects the item attributes named title, url and description in the bound Site Map source, the conditions described in the above section apply.

Expanded Online demos

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