Click or drag to resize
KaxNavigationBarItemDataBound Event
Occurs after a panel item 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 KaxNavigationBarEventHandler ItemDataBound

Value

Type: Kettic.AspNet.ControlsKaxNavigationBarEventHandler
Remarks

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();
}
See Also