Kendo.Mvc.UI.Fluent.DropDownTreeItemBuilder

Defines the fluent interface for configuring child DropDownTree items.

Methods

Items(System.Action<Kendo.Mvc.UI.Fluent.DropDownTreeItemFactory>)

Configures the child items of a DropDownTreeItem.

Parameters

addAction System.Action<Kendo.Mvc.UI.Fluent.DropDownTreeItemFactory>

The add action.

Example (ASPX)

<%= Html.Kendo().DropDownTree()
    .Name("DropDownTree")
    .Items(items =>
    {
        items.Add().Text("First Item").Items(firstItemChildren =>
        {
            firstItemChildren.Add().Text("Child Item 1");
            firstItemChildren.Add().Text("Child Item 2");
            });
        })
        %>

Id(System.String)

Sets the id of the item.

Parameters

id System.String

The id.

Example (ASPX)

<%= Html.Kendo().DropDownTree()
    .Name("DropDownTree")
    .Items(items => items.Add().Id("42"))
%>

Expanded(System.Boolean)

Define when the item will be expanded on intial render.

Parameters

value System.Boolean

If true the item will be expanded.

Example (ASPX)

<%= Html.Kendo().DropDownTree()
    .Name("DropDownTree")
    .Items(items =>
    {
        items.Add().Text("First Item").Items(firstItemChildren =>
        {
            firstItemChildren.Add().Text("Child Item 1");
            firstItemChildren.Add().Text("Child Item 2");
        })
        .Expanded(true);
    })
%>

Checked(System.Boolean)

Specify whether the item should be initially checked.

Parameters

value System.Boolean

If true, the item will be checked.

Example (ASPX)

<%= Html.Kendo().DropDownTree()
    .Name("DropDownTree")
    .Checkboxes(true)
    .Items(items =>
    {
        items.Add().Text("Item").Checked(true);
    })
%>

Value(System.String)

Sets the value of the item.

Parameters

value System.String

The value.

Example (ASPX)

<%= Html.Kendo().Menu()
    .Name("Menu")
    .Items(items => items.Add().Value("First Item"))
%>

HasChildren(System.Boolean)

Sets the expand mode of the dropdowntree item.

Parameters

value System.Boolean

If true then item will be loaded on demand from client side, if the dropdowntree DataSource is properly configured.

Example (ASPX)

<%= Html.Kendo().DropDownTree()
    .Name("DropDownTree")
    .Items(items =>
    {
        items.Add().Text("First Item").Items(firstItemChildren =>
        {
            firstItemChildren.Add().Text("Child Item 1");
            firstItemChildren.Add().Text("Child Item 2");
        })
        .HasChildren(true);
    })
%>