KaxNavigationBarItemDataBound Event |
Occurs after a panel item is data bound.
Namespace: Kettic.AspNet.ControlsAssembly: Kettic.AspNet.Controls (in Kettic.AspNet.Controls.dll) Version: 2014.4.1129.0 (2014.04.1129.0)
Syntax public event KaxNavigationBarEventHandler ItemDataBound
Public Event ItemDataBound As KaxNavigationBarEventHandler
public:
event KaxNavigationBarEventHandler^ ItemDataBound {
void add (KaxNavigationBarEventHandler^ value);
void remove (KaxNavigationBarEventHandler^ value);
}
member ItemDataBound : IEvent<KaxNavigationBarEventHandler,
KaxNavigationBarEventArgs>
Value
Type:
Kettic.AspNet.ControlsKaxNavigationBarEventHandlerRemarks
The ItemDataBound event is raised for each panel item upon
databinding. You can retrieve the item being bound using the event arguments.
The DataItem associated with the item can be retrieved using
the DataItem property.
The ItemDataBound event is often used in scenarios when
you want to perform additional mapping of fields from the DataItem
to their respective properties in the KaxNavigationBarItem class.
Examples
The following example demonstrates how to map fields from the data item to
KaxNavigationItem properties using the
ItemDataBound
event.
private void KaxNavigationBar1_ItemDataBound(object sender, Kettic.AspNetControls.KaxNavigationBarEventArgs e)
{
KaxNavigationBarItem item = e.KaxNavigationBarItem;
DataRowView dataRow = (DataRowView) e.Item.DataItem;
item.ImageUrl = "image" + dataRow["ID"].ToString() + ".gif";
item.NavigateUrl = dataRow["URL"].ToString();
}
Sub KaxNavigationBar1_ItemDataBound(ByVal sender As Object, ByVal e As KaxNavigationBarEventArgs) Handles KaxNavigationBar1.ItemDataBound
Dim item As KaxNavigationBarItem = e.KaxNavigationBarItem
Dim dataRow As DataRowView = CType(e.Item.DataItem, DataRowView)
item.ImageUrl = "image" + dataRow("ID").ToString() + ".gif"
item.NavigateUrl = dataRow("URL").ToString()
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