The DataItem property is available only during databinding in the NodeBound event:
| C# |
Copy Code |
|
protected void RadTreeView1_NodeBound(object o, RadTreeNodeEventArgs e) { DataRowView dataSourceRow = (DataRowView)e.NodeBound.DataItem; } |
| VB.NET |
Copy Code |
|
Protected Sub RadTreeView1_NodeBound(ByVal o As Object, ByVal e As RadTreeNodeEventArgs) Dim dataSourceRow As DataRowView = CType(e.NodeBound.DataItem,DataRowView) End Sub
|
You should not use it elsewhere. You can use the Value property or Custom Attributes instead.