This documentation is archived and is not being maintained.

TreeNode.DataItem Property

Note: This property is new in the .NET Framework version 2.0.

Gets the data item that is bound to the control.

Namespace: System.Web.UI.WebControls
Assembly: System.Web (in system.web.dll)

public Object DataItem { get; }
/** @property */
public Object get_DataItem ()

public function get DataItem () : Object

Property Value

A System.Object that represents the data item that is bound to the control. The default value is a null reference (Nothing in Visual Basic), which indicates that the node is not bound to any data item.

When the TreeView control is bound to a data source, such as an XmlDataSource object, this property is set to the data item that is bound to this specific node. This property is commonly used to access the values of the data item.


This property is available only after data binding has occurred.

Windows 98, Windows 2000 SP4, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see System Requirements.

.NET Framework

Supported in: 2.0