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
)
<ExtensionAttribute>
Public Shared Function BootstrapTreeView(
    builderFactory As BuilderFactory
) As BootstrapTreeViewBuilder

Parameters

Type Name Description
BuilderFactory builderFactory

A BuilderFactory object providing access to Tree View settings.

Returns

Type Description
BootstrapTreeViewBuilder

A builder for a Tree View navigation.

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