Log In
Home
Support
Demos
Documentation
Blogs
Training
Webinars
[Expand]Welcome to DevExpress .NET Documentation
[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]Reporting
  [Expand]Chart Control
  [Expand]Grid View
  [Expand]Card View
  [Expand]Vertical Grid
  [Expand]Spreadsheet
  [Expand]Rich Text Editor
  [Expand]Image and Data Browsing
  [Expand]Docking and Popups
  [Collapse]Site Navigation and Layout
   [Expand]Product Information
   [Expand]Form Layout
   [Expand]Menu
   [Expand]Navigation Bar
   [Collapse]Page Control and Tab Control
     ASPxTabControl Overview
    [Collapse]Concepts
     [Collapse]Data Binding
       Data Binding Overview
       Data Binding Using Mapping Properties
       Automatic Data Binding
       Using Data Binding Events
      Tab Layout Customization
      Templates
      Tab Control vs Page Control
    [Expand]Visual Elements
    [Expand]Examples
    Panel Overview
   [Expand]Ribbon
   [Expand]Site Map Control
   [Expand]Splitter
   [Expand]Tag Cloud Control
   [Expand]Title Index
   [Expand]TreeView
  [Expand]File Management
  [Expand]Multi-Use Site Controls
  [Expand]Scheduler
  [Expand]HTML Editor
  [Expand]Pivot Grid
  [Expand]Tree List
  [Expand]Gauges
  [Expand]Data Editors
  [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]Document Server
[Expand]Reporting
[Expand]Report Server
[Expand]Dashboard
[Expand]eXpressApp Framework
[Expand]CodeRush
[Expand]CodeRush Classic
[Expand]Cross-Platform Core Libraries
[Expand]Tools and Utilities
 End-User Documentation

Automatic Data Binding

The ASPxTabControl has a unique built-in ability to automatically retrieve data from a data source that supports the IHierarchicalEnumerable or IHierarchicalDataSource interface. This topic describes the conditions that let ASPxTabControl bind to data after just one property (ASPxHierarchicalDataWebControl.DataSourceID or ASPxDataWebControlBase.DataSource) is specified.

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

Expanded Data fields and Tab properties name match

During binding, Tab control implements its autobinding ability by retrieving tab characteristics from those data fields whose names coincide with certain property names of a Tab object. The table below lists the names of those Tab object properties that can be mapped during autobinding, and the matching data field names you should use in the data source for the mapping to work. Note that the match is not case-sensitive.

Tab properties that can be set automatically

Data field names

ActiveTabImage.Url ActiveTabImageUrl
TabBase.Name Name
Tab.NavigateUrl NavigateUrl
TabImage.Url TabImageUrl
TabBase.Text Text
TabBase.ToolTip ToolTip
Note

The names of data fields corresponding to the Tab properties of a complex structure are made up of two components: the property name and the subproperty name. Notice in the table above that the data field name TabImageUrl contains the TabImage property name and the Url subproperty name.

The following picture illustrates the process of data retrieval during automatic binding to a particular type of data source - XmlDataSource. The XmlDataSource properties are not shown here. Note that in this example the XmlDataSource is bound to the TabControlDataSource.xml file.

Note

The ASPxTabControl Tabs Editor window shown here will not be accessible in the autobinding mode. We used it here exclusively to demonstrate how the data fields should be named, so that the Tab object properties reflected their values.

Expanded Binding to a Site Map

Since the properties of a System.Web.SiteMapNode object have specific names (System.Web.SiteMapNode.Title, System.Web.SiteMapNode.Url, System.Web.SiteMapNode.Description) the ASPxTabControl is designed to autobind to a Site Map source with node attributes with similar names (not case-sensitive). In the process of binding, corresponding properties of individual Tab objects are automatically associated with these node attributes, and mapped accordingly. See the table below for name correspondence.

Site Map node attributes

Corresponding Tab object properties

title Text
url NavigateUrl
description ToolTip

Note

The structure of a Site Map allows flexibility in the naming of node attributes. If the APSxTabControl does not detect the node attributes named title, url and description in the bound Site Map source, the conditions described in the above section Data fields and Tab properties name match apply.

Tab control can bind to the Site Map via the SiteMapDataSource or the ASPxSiteMapDataSource control. The picture below demonstrates the process of data retrieval and Tab object property mapping, when binding via the ASPxSiteMapDataSource control.

Expanded Examples

Expanded Online demos

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