Skip to main content
A newer version of this page is available. .

ASPxTreeList.ExpandToLevel(Int32) Method

Expands the parent nodes down to the specified nesting level.

Namespace: DevExpress.Web.ASPxTreeList

Assembly: DevExpress.Web.ASPxTreeList.v20.2.dll

NuGet Package: DevExpress.Web

Declaration

public void ExpandToLevel(
    int level
)

Parameters

Name Type Description
level Int32

An integer value that specifies the nesting level.

Remarks

If the ExpandToLevel method is used when the page is being loaded, call it after calling the tree list’s DataBind() method.

protected void Page_Load(object sender, EventArgs e) {
    ASPxTreeList1.DataBind();
    ASPxTreeList1.ExpandToLevel(3);
}

If the TreeListSettingsBehavior.AutoExpandAllNodes option is enabled, calling the ExpandToLevel method will have no effect.

See Also