Back to Devexpress

TreeListNode.Item[Object] Property

windowsforms-devexpress-dot-xtratreelist-dot-nodes-dot-treelistnode-dot-item-x28-system-dot-object-x29.md

latest3.0 KB
Original Source

TreeListNode.Item[Object] Property

Gets or sets a value for a specific column.

Namespace : DevExpress.XtraTreeList.Nodes

Assembly : DevExpress.XtraTreeList.v25.2.dll

NuGet Packages : DevExpress.Win.Navigation, DevExpress.Win.TreeList

Declaration

csharp
[DXCategory("Data")]
public virtual object this[object columnID] { get; set; }
vb
<DXCategory("Data")>
Public Overridable Property Item(columnID As Object) As Object

Parameters

NameTypeDescription
columnIDObject

An object that identifies a column (a TreeListColumn object, field name, column’s absolute index or corresponding DataColumn object).

|

Property Value

TypeDescription
Object

The value for a specific column.

|

Remarks

The columnID argument identifies the column for which to get or set a value. The following objects and values can be passed as column identifiers:

Example

The next example demonstrates how to access a focused node value in the column which is identified by the TreeListColumn.AbsoluteIndex property set to 0.

Two ways are provided to perform this operation: via the TreeListNode.Item property and TreeListNode.SetValue method.

csharp
//first method
treeList1.FocusedNode.SetValue(0, "new value");
//second method
treeList1.FocusedNode[0] = "new value";
vb
'first method
TreeList1.FocusedNode.SetValue(0, "new value")
'second method
TreeList1.FocusedNode(0) = "new value"

See Also

TreeListNode Class

TreeListNode Members

DevExpress.XtraTreeList.Nodes Namespace