@model Sample.Models.DataItem

@(Html.Kendo().DropDownTreeFor(m => m)
    //.Name("dropdowntree") //The name of the dropdowntree is mandatory. It specifies the "id" attribute of the widget.
    .HtmlAttributes(new { style = "width: 100%" })
    .Height("auto")
    .DataValueField("id")
    .DataTextField("text")
    .Placeholder("Select Product")
    .Items(dropdowntree =>
    {
        dropdowntree.Add().Text("text 1").Id("1")
            .Items(root =>
            {
                root.Add().Text("text 2").Id("2");
                root.Add().Text("text 3").Id("3");
            });

        dropdowntree.Add().Text("text 4").Id("4")
            .Expanded(true)
            .Items(root =>
            {
                root.Add().Text("text 5").Id("5");
            });
    })
)