TreeNode.DataItem Property

Definition

Gets the data item that is bound to the control.

[System.ComponentModel.Browsable(false)]
public object DataItem { get; }

Property Value

A Object that represents the data item that is bound to the control. The default value is null, which indicates that the node is not bound to any data item.

Attributes

Remarks

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.

Nota

This property is available only after data binding has occurred.

Applies to

Prodotto Versioni
.NET Framework 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1

See also