Back to Devexpress

TreeListNode.ParentNode Property

wpf-devexpress-dot-xpf-dot-grid-dot-treelistnode-fc289016.md

latest2.8 KB
Original Source

TreeListNode.ParentNode Property

Gets the parent node.

Namespace : DevExpress.Xpf.Grid

Assembly : DevExpress.Xpf.Grid.v25.2.dll

NuGet Package : DevExpress.Wpf.Grid.Core

Declaration

csharp
public TreeListNode ParentNode { get; }
vb
Public ReadOnly Property ParentNode As TreeListNode

Property Value

TypeDescription
TreeListNode

A TreeListNode object that is the parent node. null ( Nothing in Visual Basic) if the current node is at the root level.

|

Remarks

To learn more, see Binding to Self-Referential Data Structure and Nodes.

The following code snippet (auto-collected from DevExpress Examples) contains a reference to the ParentNode property.

Note

The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.

wpf-grid-sync-isnodeexpanded-with-view-model/CS/DevExpress.Example04/BindableExpandingBehavior.cs#L103

csharp
while(isExpanded && node.ParentNode != null) {
    node.ParentNode.IsExpanded = isExpanded;

wpf-grid-sync-isnodeexpanded-with-view-model/VB/DevExpress.Example04/BindableExpandingBehavior.vb#L105

vb
Do While isExpanded AndAlso node.ParentNode IsNot Nothing
    node.ParentNode.IsExpanded = isExpanded

See Also

IsDescendantOf(TreeListNodeBase)

TreeListNode Class

TreeListNode Members

DevExpress.Xpf.Grid Namespace