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

Items Binding

The DropDownTree allows you to declare its items within the helper declaration. This approach is suitable for a limited number of options, because each item is defined manually in the Items configuration.

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");
                });
        })
    )

See Also

In this article