Back to Devexpress

DxTreeView.ExpandAll() Method

blazor-devexpress-dot-blazor-dot-dxtreeview-76489c91.md

latest1.2 KB
Original Source

DxTreeView.ExpandAll() Method

Expands all nodes in the DxTreeView.

Namespace : DevExpress.Blazor

Assembly : DevExpress.Blazor.v25.2.dll

NuGet Package : DevExpress.Blazor

Declaration

csharp
public void ExpandAll()

Remarks

Use the ExpandAll and CollapseAll() methods to expand and collapse all nodes in the DxTreeView.

The following code snippet implements the Expand all and Collapse all buttons.

razor
<button type="button" @onclick="@(() => SampleTreeView.ExpandAll())">Expand all</button>
<button type="button" @onclick="@(() => SampleTreeView.CollapseAll())">Collapse all</button>

<DxTreeView @ref="@SampleTreeView">
    @* ... *@
</DxTreeView>    

@code {
    DxTreeView SampleTreeView;
}

Note

In Load Child Nodes on Demand mode, the ExpandAll method also loads all the child nodes that were not loaded yet.

See Also

DxTreeView Class

DxTreeView Members

DevExpress.Blazor Namespace