KaxTabControlTabDataBound Event |
Occurs when a tab is data bound.
Namespace: Kettic.AspNet.ControlsAssembly: Kettic.AspNet.Controls (in Kettic.AspNet.Controls.dll) Version: 2014.4.1129.0 (2014.04.1129.0)
Syntaxpublic event KaxTabControlEventHandler TabDataBound
Public Event TabDataBound As KaxTabControlEventHandler
public:
event KaxTabControlEventHandler^ TabDataBound {
void add (KaxTabControlEventHandler^ value);
void remove (KaxTabControlEventHandler^ value);
}
member TabDataBound : IEvent<KaxTabControlEventHandler,
KaxTabControlEventArgs>
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");
}
Sub KaxTabControl1_TabDataBound(ByVal sender As Object, ByVal e As Kettic.AspNet.Controls.KaxTabControlEventArgs) Handles KaxTabControl1.TabDataBound
e.Tab.ImageUrl = "image" & DataBinder.Eval(e.Tab.DataItem, "ID") & ".gif"
e.Tab.NavigateUrl = CStr(DataBinder.Eval(e.Tab.DataItem, "URL"))
End Sub
No code example is currently available or this language may not be supported.
No code example is currently available or this language may not be supported.
See Also