TreeListNode.Tag Property

Gets or sets the data associated with a Tree List node.

Namespace: DevExpress.XtraTreeList.Nodes

Assembly: DevExpress.XtraTreeList.v21.2.dll


public virtual object Tag { get; set; }

Property Value

Type Default Description


An object containing information associated with the Tree List node.


This property can be used to store any object that you want to associate with a node.


The following example demonstrates a way to traverse through root nodes. A Boolean value is assigned to the TreeListNode.Tag property of each visited node. Odd nodes get a true property value, while even nodes get a false value.

bool oddRow = false;
for(int i = 0; i < treeList1.Nodes.Count; i++) {
   treeList1.Nodes[i].Tag = oddRow;
   oddRow = ! oddRow;
See Also