Back to Devexpress

TreeList.AppendNode(Object, TreeListNode, CheckState, Object) Method

windowsforms-devexpress-dot-xtratreelist-dot-treelist-dot-appendnode-x28-system-dot-object-devexpress-dot-xtratreelist-dot-nodes-dot-treelistnode-system-dot-windows-dot-forms-dot-checkstate-system-dot-object-x29.md

latest3.2 KB
Original Source

TreeList.AppendNode(Object, TreeListNode, CheckState, Object) Method

Adds a TreeListNode containing the specified values to the XtraTreeList.

Namespace : DevExpress.XtraTreeList

Assembly : DevExpress.XtraTreeList.v25.2.dll

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

Declaration

csharp
public virtual TreeListNode AppendNode(
    object nodeData,
    TreeListNode parentNode,
    CheckState checkState,
    object tag
)
vb
Public Overridable Function AppendNode(
    nodeData As Object,
    parentNode As TreeListNode,
    checkState As CheckState,
    tag As Object
) As TreeListNode

Parameters

NameTypeDescription
nodeDataObject

An array of values or a DataRow object, used to initialize the created node’s cells.

| | parentNode | TreeListNode |

A parent node for the added one.

| | checkState | CheckState |

The node’s check state.

| | tag | Object |

An object that contains information associated with the Tree List node. This value is assigned to the TreeListNode.Tag property.

|

Returns

TypeDescription
TreeListNode

A TreeListNode object or descendant representing the added node.

|

Remarks

Use the AppendNode method to append a new node to the specified node’s child collection. Use the parentNode parameter to specify the parent node. To add a node at the root level, set the parentNode parameter to null.

The nodeData parameter specifies data for the columns of the node that is to be created. This parameter value can be an array of values or a DataRow object. The number and order of items in the array/DataRow object must match the number and order of Tree List columns.

Refer to the Nodes topic to learn more.

See Also

Nodes

TreeList Class

TreeList Members

DevExpress.XtraTreeList Namespace