Back to Devexpress

ASPxTreeView.ExpandToNode(TreeViewNode) Method

aspnet-devexpress-dot-web-dot-aspxtreeview-dot-expandtonode-x28-devexpress-dot-web-dot-treeviewnode-x29.md

latest2.9 KB
Original Source

ASPxTreeView.ExpandToNode(TreeViewNode) Method

Expands the nodes down to the specified node.

Namespace : DevExpress.Web

Assembly : DevExpress.Web.v25.2.dll

NuGet Package : DevExpress.Web

Declaration

csharp
public void ExpandToNode(
    TreeViewNode node
)
vb
Public Sub ExpandToNode(
    node As TreeViewNode
)

Parameters

NameTypeDescription
nodeTreeViewNode

The TreeViewNode object that specifies the desired node.

|

Remarks

Use the ExpandToNode method, to expand nodes to the specified node.

The following code snippet (auto-collected from DevExpress Examples) contains a reference to the ExpandToNode(TreeViewNode) 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-implement-sidebar-navigation/CS/AdaptiveSlideNavigation/UserControls/Navigation.ascx.cs#L19

csharp
if(node != null) {
    NavigationTreeView.ExpandToNode(node);
    node.Expanded = true;

asp-net-web-forms-implement-sidebar-navigation/VB/AdaptiveSlideNavigation/UserControls/Navigation.ascx.vb#L23

vb
If node IsNot Nothing Then
    NavigationTreeView.ExpandToNode(node)
    node.Expanded = True

See Also

Expanding and Collapsing Nodes

Member Table: Expanding and Collapsing Nodes

Tree View

ASPxTreeView Class

ASPxTreeView Members

DevExpress.Web Namespace