Back to Devexpress

TreeListNode.Expand(Boolean) Method

windowsforms-devexpress-dot-xtratreelist-dot-nodes-dot-treelistnode-dot-expand-x28-system-dot-boolean-x29.md

latest4.6 KB
Original Source

TreeListNode.Expand(Boolean) Method

Expands the node.

Namespace : DevExpress.XtraTreeList.Nodes

Assembly : DevExpress.XtraTreeList.v25.2.dll

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

Declaration

csharp
public void Expand(
    bool animate = false
)
vb
Public Sub Expand(
    animate As Boolean = False
)

Optional Parameters

NameTypeDefaultDescription
animateBooleanFalse

true to expand the node with animation; otherwise, false.

|

Remarks

Use the methods below to expand and collapse tree list nodes.

The control’s BeforeExpand, AfterExpand, BeforeCollapse, and AfterCollapse events fire during expand and collapse operations. For example, you can handle the BeforeExpand event to dynamically create child nodes in unbound mode.

The following code snippet (auto-collected from DevExpress Examples) contains a reference to the Expand(Boolean) method.

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.

drag-drop-grid-rows-to-treelist/CS/DragAndDropRows/Form1.cs#L86

csharp
if(node.ParentNode != null)
        node.ParentNode.Expand();
}

drag-drop-grid-rows-to-treelist/VB/DragAndDropRows/Form1.vb#L82

vb
If node.ParentNode IsNot Nothing Then node.ParentNode.Expand()
Next

See Also

Collapse(Boolean)

TreeListNode Class

TreeListNode Members

DevExpress.XtraTreeList.Nodes Namespace