TreeListNode.Expanded Property
Gets or sets whether the node is expanded.
Namespace: DevExpress.XtraTreeList.Nodes
Assembly: DevExpress.XtraTreeList.v19.2.dll
Declaration
Property Value
Type | Default | Description |
---|---|---|
Boolean | **false** | true, if the node is expanded; otherwise, false. |
Remarks
Set the Expanded
property to true
to display child nodes of the current node. If set to false
, the current node collapses and all its child nodes are hidden.
using DevExpress.XtraTreeList.Nodes;
TreeListNode node = treeList1.GetNodeByVisibleIndex(0);
node.Expanded = !node.Expanded;
If the TreeListNode.HasChildren property is set to false
, setting the Expanded
property to true
does nothing. When the TreeListNode.HasChildren property is set to true
, setting the TreeListNode.Expanded
property to true
causes the Tree List to fire the TreeList.BeforeExpand event. It allows the dynamic loading feature to be implemented in unbound mode.
Related GitHub Examples
The following code snippets (auto-collected from DevExpress Examples) contain references to the Expanded 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.