ASPxTabControl.TabDataBound Event

Occurs after a tab has been bound to a data source.

Namespace: DevExpress.Web

Assembly: DevExpress.Web.v21.2.dll


public event TabControlEventHandler TabDataBound

Event Data

The TabDataBound event's data class is TabControlEventArgs. The following properties provide information specific to this event:

Property Description
Tab Gets a tab object related to the event.


The TabDataBound event is raised for each tab after it’s data bound to the corresponding data from the specified data source. This event enables you to customize settings of the related tab before it is finally rendered. Handling the TabDataBound event correctly you can, for example, implement a custom logic to dynamically map properties of a tab control’s tabs to the required data fields.

The processed tab can be accessed by using the TabControlEventArgs.Tab property of the event’s argument.

If the control functions in unbound mode, the TabDataBound event isn’t raised.


This example demonstrates how to use the ASPxTabControl.TabDataBound event.

<%@ Page Language="C#" AutoEventWireup="true"  CodeFile="Default.aspx.cs" 
Inherits="_Default" %>
<%@ Register assembly="DevExpress.Web.v8.3, Version=, Culture=neutral, 
PublicKeyToken=b88d1754d700e49a" namespace="DevExpress.Web.ASPxTabControl" tagprefix="dxtc" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 

<script runat="server">
    protected void Page_Load(object sender, EventArgs e){
    protected void ASPxTabControl1_TabDataBound(object source, 
        DevExpress.Web.TabControlEventArgs e) {
        e.Tab.Text = "About " + e.Tab.Text;

<html xmlns="">
<head runat="server">
    <form id="form1" runat="server">

        <dxtc:ASPxTabControl ID="ASPxTabControl1" runat="server" 
            DataSourceID="XmlDataSource1" NavigateUrlField="id" 
            NavigateUrlFormatString="?id={0}" ontabdatabound="ASPxTabControl1_TabDataBound">
        <asp:XmlDataSource ID="XmlDataSource1" runat="server" 
            DataFile="~/App_Data/TabControlData.xml" XPath="//product">

See Also