Click or drag to resize
KaxNavigationItemDataItem Property
Gets or sets the data item represented by the item.

Namespace: Kettic.AspNet.Controls
Assembly: Kettic.AspNet.Controls (in Kettic.AspNet.Controls.dll) Version: 2014.4.1129.0 (2014.04.1129.0)
Syntax
public override Object DataItem { get; set; }

Property Value

Type: Object
An object representing the data item to which the Item is bound to. The DataItem property will always return null when accessed outside of ItemDataBound event handler.
Remarks
This property is applicable only during data binding. Use it along with the ItemDataBound event to perform additional mapping of fields from the data item to KaxNavigationItem properties.
Examples
The following example demonstrates how to map fields from the data item to %KaxNavigationItem properties. It assumes the user has subscribed to the ItemDataBound:KaxNavigationBar.ItemDataBound event.:KaxNavigationItem%
private void KaxNavigationBar1_NavigationItemDataBound(object sender, Kettic.AspNetControls.KaxNavigationBarEventArgs e)
{
    KaxNavigationItem item = e.Item;
    DataRowView dataRow = (DataRowView) e.Item.DataItem;

    item.ImageUrl = "image" + dataRow["ID"].ToString() + ".gif";
    item.NavigateUrl = dataRow["URL"].ToString();
}
See Also