KaxTreeViewNodeDataBound Event |
Occurs when a node 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 KaxTreeViewEventHandler NodeDataBound
Public Event NodeDataBound As KaxTreeViewEventHandler
public:
event KaxTreeViewEventHandler^ NodeDataBound {
void add (KaxTreeViewEventHandler^ value);
void remove (KaxTreeViewEventHandler^ value);
}
member NodeDataBound : IEvent<KaxTreeViewEventHandler,
KaxTreeNodeEventArgs>
Value
Type:
Kettic.AspNet.ControlsKaxTreeViewEventHandlerRemarks
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");
}
Sub KaxTreeView1_NodeDataBound(ByVal sender As Object, ByVal e As Kettic.AspNet.Controls.KaxTreeNodeEventArgs) Handles KaxTreeView1.NodeDataBound
e.Node.ImageUrl = "image" & DataBinder.Eval(e.Node.DataItem, "ID") & ".gif"
e.Node.NavigateUrl = CStr(DataBinder.Eval(e.Node.DataItem, "URL"))
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