Skip to main content

Bind Tab Control to Data

  • 2 minutes to read

Apart from the possibility to create tabs and specify their properties manually, data from a data source file can be used to populate the tabs through the process of binding. The ASPxTabControl can be bound to any object that implements the IHierarchicalEnumerable or IHierarchicalDataSource interface (e.g. SiteMapDataSource, XmlDataSource).

A data source can be specified by using either one of these properties of the tab control:

The ASPxTabControl supports two methods to retrieve data from the specified data source. One involves manually setting the control’s specific data-related properties to the data source node attribute names. The other one exploits the ASPxTabControl’s unique ability to retrieve data automatically, given that the data source node attributes are named after the property names of a Tab object.

Whichever way you choose, the APSxTabControl automatically creates the Tab objects and retrieves their property values from the corresponding nodes.

Additionally, the ASPxTabControl provides you with specific events related to data binding, that you can handle according to your application logic (for example, modify tab object properties).

Other topics in this section

Examples

Online demos