Click or drag to resize
KaxTabControlTabDataBound Event
Occurs when a tab is data bound.

Namespace: Kettic.AspNet.Controls
Assembly: Kettic.AspNet.Controls (in Kettic.AspNet.Controls.dll) Version: 2014.4.1129.0 (2014.04.1129.0)
Syntax
public event KaxTabControlEventHandler TabDataBound

Value

Type: Kettic.AspNet.ControlsKaxTabControlEventHandler
Remarks

The TabDataBound event is raised for each tab upon databinding. You can retrieve the tab being bound using the event arguments. The DataItem associated with the tab can be retrieved using the DataItem property.

The TabDataBound event is often used in scenarios when you want to perform additional mapping of fields from the DataItem to their respective properties in the Tab class.

Examples
The following example demonstrates how to map fields from the data item to tab properties using the TabDataBound event.
protected void KaxTabControl1_TabDataBound(object sender, Kettic.AspNet.Controls.KaxTabControlEventArgs e)
{
    e.Tab.ImageUrl = "image" + (string)DataBinder.Eval(e.Tab.DataItem, "ID") + ".gif";
    e.Tab.NavigateUrl = (string)DataBinder.Eval(e.Tab.DataItem, "URL");
}
See Also