New to Telerik UI for ASP.NET Core? Download free 30-day trial

Data Binding

The DropDownTree component provides support for declaratively defining its items and for local (on the server) and remote (using a DataSource configuration object) binding.

Declaring DropDownTree Items

The DropDownTree allows you to declare all of its items within the helper declaration.

The following example demonstrates how to configure a DropDownTree with three levels of hierarchy.

    @(Html.Kendo().DropDownTree()
        .Name("dropdowntree")
        .Items(dropdowntree =>
        {
            dropdowntree.Add().Text("My Documents")
                .Expanded(true)
                .Items(root =>
                {
                    root.Add().Text("Kendo UI Project")
                        .Expanded(true)
                        .Items(project =>
                        {
                            project.Add().Text("about.html");
                            project.Add().Text("index.html");
                            project.Add().Text("logo.png");
                        });

                    root.Add().Text("New Web Site");
                    root.Add().Text("Reports");
                });
        })
    )

The DropDownTree supports the following data-binding approaches:

See Also

In this article