Click or drag to resize
KaxTreeNodeDataItem Property
Gets the data item that is bound to the node

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 that represents the data item that is bound to the node. The default value is null (Nothing in Visual Basic), which indicates that the node is not bound to any data item. The return value will always be null unless accessed within a NodeDataBound event handler.
Remarks
This property is applicable only during data binding. Use it along with the NodeDataBound event to perform additional mapping of fields from the data item to KaxTreeNode properties.
Examples
The following example demonstrates how to map fields from the data item to KaxTreeNode properties. It assumes the user has subscribed to the NodeDataBound event.
private void KaxTreeView1_NodeDataBound(object sender, Kettic.AspNet.Controls.KaxTreeNodeEventArgs e)
{
    e.Node.ImageUrl = "image" + (string)DataBinder.Eval(e.Node.DataItem, "ID") + ".gif";
    e.Node.NavigateUrl = (string)DataBinder.Eval(e.Node.DataItem, "URL");
}
See Also