Back to Devexpress

ASPxTreeView.ExpandAll() Method

aspnet-devexpress-dot-web-dot-aspxtreeview-a07aa6e9.md

latest2.8 KB
Original Source

ASPxTreeView.ExpandAll() Method

Expands all nodes in the ASPxTreeView.

Namespace : DevExpress.Web

Assembly : DevExpress.Web.v25.2.dll

NuGet Package : DevExpress.Web

Declaration

csharp
public void ExpandAll()
vb
Public Sub ExpandAll

Remarks

The ExpandAll method expands all nodes which are currently collapsed. This method invokes the ASPxTreeView.ExpandedChanging event before expanding and the ASPxTreeView.ExpandedChanged event after expanding.

To expand all nodes on the client, use the ASPxClientTreeView.ExpandAll method.

For more information, see the Expanding and Collapsing Nodes topic.

Example

The code below demonstrates how to expand an ASPxTreeView, after the page is loaded.

csharp
protected void Page_Load(object sender, EventArgs e) {
            ASPxTreeView1.ExpandAll();
    }

The following code snippet (auto-collected from DevExpress Examples) contains a reference to the ExpandAll() 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.

asp-net-web-forms-create-responsive-web-app/CS/ResponsiveWebApplication/Article.aspx.cs#L10

csharp
TableOfContentsTreeView.DataBind();
    TableOfContentsTreeView.ExpandAll();
}

See Also

Expanding and Collapsing Nodes

Member Table: Expanding and Collapsing Nodes

Tree View

ASPxTreeView Class

ASPxTreeView Members

DevExpress.Web Namespace