Click or drag to resize
KaxTreeViewNodeDataBound Event
Occurs when a node 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 KaxTreeViewEventHandler NodeDataBound

Value

Type: Kettic.AspNet.ControlsKaxTreeViewEventHandler
Remarks

The NodeDataBound event is raised for each node upon danodeinding. You can retrieve the node being bound using the event arguments. The DataItem associated with the node can be retrieved using the DataItem property.

The NodeDataBound event is often used in scenarios when you want to perform additional mapping of fields from the DataItem to their respective properties in the KaxTreeNode class.

Examples
The following example demonstrates how to map fields from the data item to KaxTreeNode properties using the NodeDataBound event.
protected 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