TreeList.CollapseToLevel(Int32) Method

Collapses all nodes at the specified and subsequent levels.

Namespace: DevExpress.XtraTreeList

Assembly: DevExpress.XtraTreeList.v21.1.dll

Declaration

public void CollapseToLevel(
    int level
)

Parameters

Name Type Description
level Int32

An Int32 value that specifies the level starting from which nodes should be collapsed. 0 to collapse nodes starting from the root.

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.

See Also