The requested page is not available for the requested platform. You are viewing the content for Default platform.

ASPxTreeList.ExpandToLevel(Int32) Method

Expands the parent nodes down to the specified nesting level.

Namespace: DevExpress.Web.ASPxTreeList

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

Declaration

public void ExpandToLevel(
    int level
)
Public Sub ExpandToLevel(
    level As Integer
)

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