Skip to main content

BuilderFactoryExtensions.BootstrapTreeView(BuilderFactory) Method

Creates a Tree View navigation.

Namespace: DevExpress.AspNetCore

Assembly: DevExpress.AspNetCore.Bootstrap.v18.2.dll

Declaration

public static BootstrapTreeViewBuilder BootstrapTreeView(
    this BuilderFactory builderFactory
)

Parameters

Name Type Description
builderFactory BuilderFactory

A BuilderFactory object providing access to Tree View settings.

Returns

Type Description
BootstrapTreeViewBuilder

A builder for a Tree View navigation.

Remarks

IMPORTANT

Bootstrap Controls for ASP.NET Core are in maintenance mode. We don’t add new controls or develop new functionality for this product line. Our recommendation is to use the ASP.NET Core Controls suite.

The code sample below demonstrates how you can use this method to create a Tree View navigation.

@(Html.DevExpress()
    .BootstrapTreeView()
    .Nodes(nodes => {
        nodes.Add()
            .Text("Home")
            .Expanded(true)
            .Nodes(childNodes => {
                childNodes.Add().Text("News")
                    .Nodes(innerNodes => {
                        innerNodes.Add().Text("For Developers");
                        innerNodes.Add().Text("Website news");
                    });
                childNodes.Add().Text("Our Mission");
            });

    })
)
See Also