DropDownTreeBuilder

Methods

AutoBind(System.Boolean)

Controls whether to bind the widget to the DataSource on initialization.

Parameters

autoBind - System.Boolean

The value for autoBind

Example

Razor
 
             @( Html.Kendo().DropDownTree()
                        .Name("DropDownTree")
                        .AutoBind(false)
            )
             

AutoClose(System.Boolean)

Controls whether to close the popup when item is selected or checked.

Parameters

autoClose - System.Boolean

The value for AutoClose

Example

Razor
 
             @( Html.Kendo().DropDownTree()
                        .Name("DropDownTree")
                        .AutoClose(true)
            )
             

AutoWidth(System.Boolean)

If set to true, the widget automatically adjusts the width of the popup element and does not wrap up the item label.

Parameters

autoWidth - System.Boolean

The value for AutoWidth

Example

Razor
 
             @( Html.Kendo().DropDownTree()
                        .Name("DropDownTree")
                        .AutoWidth(true)
            )
             

CheckAll(System.Boolean)

When this options is set to true and checkboxes are enabled, a tristate checkbox appears above the embedded treeview. Clicking that checkbox will check or uncheck all the loaded enabled items of the treeview.

Parameters

checkAll - System.Boolean

The value for CheckAll

Example

Razor
 
             @( Html.Kendo().DropDownTree()
                        .Name("DropDownTree")
                        .CheckAll(true)
                        .Checkboxes(true)
            )
             

CheckAllTemplate(System.String)

The template used to render the checkAll label. By default, the widget displays only a span element with text "Check all".

Parameters

value - System.String

The value for CheckAllTemplate

Example

Razor
 
             @( Html.Kendo().DropDownTree()
                        .Name("DropDownTree")
                        .CheckAllTemplate("Check All Label")
            )
             

CheckAllTemplateId(System.String)

The template used to render the checkAll label. By default, the widget displays only a span element with text "Check all".

Parameters

templateId - System.String

The ID of the template element for CheckAllTemplate

Example

Razor
 
             @( Html.Kendo().DropDownTree()
                        .Name("DropDownTree")
                        .TemplateId("widgetTemplateId")
            )
             

CheckAllTemplateView(System.Web.Mvc.MvcHtmlString)

The template used to render the checkAll label. By default, the widget displays only a span element with text "Check all".

Parameters

templateView - System.Web.Mvc.MvcHtmlString

The view that contains CheckAllTemplate

Example

Razor
 
             @( Html.Kendo().DropDownTree()
                        .Name("DropDownTree")
                        .CheckAllTemplateView(Html.Partial("TemplateView"))
            )
             

CheckAllTemplateHandler(System.String)

Specifies a JavaScript function name. The value returned by thе function will bе used to render the checkAll label of the dropdowntree.

Parameters

value - System.String

The name of the JavaScript function that will handle the template evaluation.

Example

Razor
 
             @( Html.Kendo().DropDownTree()
                        .Name("DropDownTree")
                        .CheckAllTemplateHandler("checkAllTemplateHandler")
            )
             

CheckAllTemplate(Kendo.Mvc.UI.Fluent.TemplateBuilder)

Defines the template used to render the "checkAll" label. By default, the component displays a "span" element with text "Check all".

Parameters

template - TemplateBuilder<TModel>

A Template component that configures the "checkAll" label template.

Example

Razor
 
             @(Html.Kendo().DropDownTree()
                  .Name("dropDownTree")
                  .CheckAll(true)
                  .CheckAllTemplate(Html.Kendo().Template().AddHtml("<h2>Check ALL items</h2>"))
             )
             

Template(System.String)

Template to be used for rendering of the items in the dropdowntree.

Parameters

template - System.String

Example

Razor
 
             @( Html.Kendo().DropDownTree()
                        .Name("DropDownTree")
                        .Template("#= data #")
            )
             

TemplateId(System.String)

Id of the template element to be used for rendering the items in the dropdowntree.

Parameters

templateId - System.String

The ID of the template element for TemplateId

Example

Razor
 
             @( Html.Kendo().DropDownTree()
                        .Name("DropDownTree")
                        .TemplateId("widgetTemplateId")
            )
             

TemplateView(System.Web.Mvc.MvcHtmlString)

A Partial View to be used for the rendering of the items in the dropdowntree.

Parameters

templateView - System.Web.Mvc.MvcHtmlString

The view that contains the items template

Example

Razor
 
             @( Html.Kendo().DropDownTree()
                        .Name("DropDownTree")
                        .TemplateView(Html.Partial("TemplateView"))
            )
             

TemplateHandler(System.String)

Specifies a JavaScript function name. The value returned by thе function will bе used to render the items in the dropdowntree.

Parameters

value - System.String

The name of the JavaScript function that will handle the template evaluation.

Example

Razor
 
             @( Html.Kendo().DropDownTree()
                        .Name("DropDownTree")
                        .TemplateHandler("templateHandler")
            )
             

Template(Kendo.Mvc.UI.Fluent.TemplateBuilder)

Defines the template that renders each DropDownTree item.

Parameters

template - TemplateBuilder<TModel>

A Template component that configures each item's template.

Example

Razor
 
             @(Html.Kendo().DropDownTree()
                  .Name("dropDownTree")
                  .Template(Html.Kendo().Template().AddHtml("Option: ${data.item.text}"))
             )
             

Checkboxes(System.Boolean)

Enable/disable rendering of checkboxes in the dropdowntree.

Parameters

enabled - System.Boolean

Whether checkboxes should be rendered.

Example

Razor
 
             @( Html.Kendo().DropDownTree()
                        .Name("DropDownTree")
                        .Checkboxes(true)
            )
             

Checkboxes(System.Action)

Configures rendering of checkboxes in the dropdowntree.

Parameters

configure - System.Action<DropDownTreeCheckboxesBuilder>

Builder of the dropdowntree checkboxes configuration.

Example

Razor
 
             @( Html.Kendo().DropDownTree()
                        .Name("DropDownTree")
                        .Checkboxes(config => config
                            .CheckChildren(true)
                        )
            )
             

ClearButton(System.Boolean)

Unless this option is set to false, a button will appear when hovering the widget. Clicking that button will reset the widget's value and will trigger the change event.

Parameters

value - System.Boolean

The value for ClearButton

Example

Razor
 
             @( Html.Kendo().DropDownTree()
                        .Name("DropDownTree")
                        .ClearButton(false)
            )
             

Items(System.Action)

Defines the items in the DropDownTree through the DropDownTreeItemFactory

Parameters

addAction - System.Action<DropDownTreeItemFactory>

The add action.

Example

Razor
 
             @( Html.Kendo().DropDownTree()
                        .Name("DropDownTree")
                        .Items(items =>
                        {
                            items.Add().Text("First Item");
                            items.Add().Text("Second Item");
                        })
            )
             

Events(System.Action)

Configures the client-side events.

Parameters

clientEventsAction - System.Action<DropDownTreeEventBuilder>

The client events action.

Example

Razor
 
             @( Html.Kendo().DropDownTree()
                        .Name("DropDownTree")
                        .Events(events =>
                            .OnDataBinding("onDataBinding")
                            .OnItemDataBound("onItemDataBound")
                        )
            )
             

BindTo(System.String,System.Action)

Binds the DropDownTree to a sitemap

Parameters

viewDataKey - System.String

The view data key.

siteMapAction - System.Action<DropDownTreeItem,SiteMapNode>

The action to configure the item.

Example

Razor
 
             @( Html.Kendo().DropDownTree()
                        .Name("DropDownTree")
                        .BindTo("examples", (item, siteMapNode) =>
                        {
                        })
            )
             

BindTo(System.String)

Binds the DropDownTree to a sitemap.

Parameters

viewDataKey - System.String

The view data key.

Example

Razor
 
             @( Html.Kendo().DropDownTree()
                        .Name("DropDownTree")
                        .BindTo("examples")
            )
             

BindTo(System.Collections.Generic.IEnumerable)

Binds the DropDownTree to a list of items. Use if a hierarchy of items is being sent from the controller; to bind the DropDownTree declaratively, use the Items() method.

Parameters

items - System.Collections.Generic.IEnumerable<DropDownTreeItemModel>

The list of items

Example

Razor
 
             @( Html.Kendo().DropDownTree()
                        .Name("DropDownTree")
                        .BindTo(model)
            )
             

BindTo(System.Collections.Generic.IEnumerable,System.Action)

Binds the DropDownTree to a list of objects. The DropDownTree will be "flat" which means a DropDownTree item will be created for every item in the data source.

Parameters

dataSource - System.Collections.Generic.IEnumerable<T>

The data source.

itemDataBound - System.Action<DropDownTreeItem,T>

The action executed for every data bound item.

Example

Razor
 
             @( Html.Kendo().DropDownTree()
                        .Name("DropDownTree")
                        .BindTo(new []{"First", "Second"}, (item, value) =>
                        {
                           item.Text = value;
                        })
            )
             

BindTo(System.Collections.IEnumerable,System.Action)

Binds the DropDownTree to a list of objects. The DropDownTree will create a hierarchy of items using the specified mappings.

Parameters

dataSource - System.Collections.IEnumerable

The data source.

factoryAction - System.Action<NavigationBindingFactory>

The action which will configure the mappings

Example

Razor
 
             @( Html.Kendo().DropDownTree()
                        .Name("DropDownTree")
                        .BindTo(Model, mapping => mapping
                                .For<Customer>(binding => binding
                                    .Children(c => c.Orders) // The "child" items will be bound to the the "Orders" property
                                    .ItemDataBound((item, c) => item.Text = c.ContactName) // Map "Customer" properties to DropDownTreeItem properties
                                )
                                .For<Order<(binding => binding
                                    .Children(o => null) // "Orders" do not have child objects so return "null"
                                    .ItemDataBound((item, o) => item.Text = o.OrderID.ToString()) // Map "Order" properties to DropDownTreeItem properties
                                )
                        )
            )
             

Animation(System.Boolean)

Use to enable or disable animation of the DropDownTree.

Parameters

enable - System.Boolean

The boolean value.

Example

Razor
 
            @( Html.Kendo().DropDownTree()
                       .Name("DropDownTree")
                       .Animation(false) //toggle effect
            )
             

Animation(System.Action)

Configures the animation effects of the widget.

Parameters

animationAction - System.Action<PopupAnimationBuilder>

The action which configures the animation effects.

Example

Razor
 
            @( Html.Kendo().DropDownTree()
                       .Name("DropDownTree")
                       .Animation(animation =>
                       {
            	            animation.Open(open =>
            	            {
            	                open.SlideIn(SlideDirection.Down);
            	            });
                       })
            )
             

DataSource(System.Action)

Configure the DataSource of the component

Parameters

configurator - System.Action<HierarchicalDataSourceBuilder>

The action that configures the DataSource.

Example

Razor
 
             @( Html.Kendo().DropDownTree()
                .Name("DropDownTree")
                .DataSource(dataSource => dataSource
                    .Read(read => read
                        .Action("Employees", "DropDownTree")
                    )
                )
             )
             

DataSource(System.String)

Accepts the Name of the external DataSource component that is to be used for data binding

Parameters

dataSourceId - System.String

The name of the external DataSource.

Example

Razor
 
             @( Html.Kendo().DropDownTree()
                .Name("DropDownTree")
                .DataSource("dataSourceName")
             )
             

DataImageUrlField(System.String)

Sets the field of the data item that provides the image URL of the DropDownTree nodes.

Parameters

value - System.String

The value that configures the dataimageurlfield.

Example

Razor
 
             @( Html.Kendo().DropDownTree()
                        .Name("DropDownTree")
                        .DataImageUrlField("ImageUrl")
            )
             

DataSpriteCssClassField(System.String)

Sets the field of the data item that provides the sprite CSS class of the nodes. If an array, each level uses the field that is at the same index in the array, or the last item in the array.

Parameters

value - System.String

The value that configures the dataspritecssclassfield.

Example

Razor
 
             @( Html.Kendo().DropDownTree()
                        .Name("DropDownTree")
                        .DataSpriteCssClassField("SpriteCssClass")
            )
             

DataUrlField(System.String)

Sets the field of the data item that provides the link URL of the nodes.

Parameters

value - System.String

The value that configures the dataurlfield.

Example

Razor
 
             @( Html.Kendo().DropDownTree()
                        .Name("DropDownTree")
                        .DataUrlField("Url")
            )
             

Messages(System.Action)

The DropDownTreeMessagesSettingsBuilder that configures the messages displayed in the widget. Use it to customize or localize the messages.

Parameters

configurator - System.Action<DropDownTreeMessagesSettingsBuilder>

The action that configures the messages.

DataTextField(System.String)

Sets the field of the data item that provides the text content of the nodes. If an array, each level uses the field that is at the same index in the array, or the last item in the array.

Parameters

value - System.String

The value that configures the datatextfield.

Example

Razor
 
             @( Html.Kendo().DropDownTree()
                        .Name("DropDownTree")
                        .DataTextField("Name")
            )
             

DataTextField(System.String[])

Sets the field of the data item that provides the text content of the nodes. If an array, each level uses the field that is at the same index in the array, or the last item in the array.

Parameters

value - System.String[]

The value that configures the datatextfield.

Example

Razor
 
             @( Html.Kendo().DropDownTree()
                        .Name("DropDownTree")
                        .DataTextField([{"Name"}])
            )
             

DataValueField(System.String)

The field of the data item that provides the value of the widget. If an array, each level uses the field that is at the same index in the array, or the last item in the array.

Parameters

value - System.String

The value for DataValueField

Example

Razor
 
             @( Html.Kendo().DropDownTree()
                        .Name("DropDownTree")
                        .DataValueField("Value")
            )
             

Delay(System.Int32)

Specifies the delay in milliseconds after which the DropDownTree will start filtering dataSource.

Parameters

value - System.Int32

The value for Delay

Example

Razor
 
             @( Html.Kendo().DropDownTree()
                        .Name("DropDownTree")
                        .Delay(300)
            )
             

Enable(System.Boolean)

If set to false the widget will be disabled and will not allow user input. The widget is enabled by default and allows user input.

Parameters

value - System.Boolean

The value for Enable

Example

Razor
 
            @(Html.Kendo().DropDownTree()
                        .Name("DropDownTree")
                        .Enable(false)
            )
             

EnforceMinLength(System.Boolean)

If set to true the widget will not show all items when the text of the search input cleared. By default, the widget shows all items when the text of the search input is cleared. Works in conjunction with minLength.

Parameters

value - System.Boolean

The value for EnforceMinLength

Example

Razor
 
            @(Html.Kendo().DropDownTree()
                        .Name("DropDownTree")
                        .MinLength(3)
                        .EnforceMinLength(true)
            )
             

FooterTemplate(System.String)

The template used to render the footer template. The footer template receives the widget itself as a part of the data argument. Use the widget fields directly in the template.

Parameters

value - System.String

The value for FooterTemplate

Example

Razor
 
             @( Html.Kendo().DropDownTree()
                        .Name("DropDownTree")
                        .FooterTemplate("Footer Text")
            )
             

FooterTemplateId(System.String)

The template used to render the footer template. The footer template receives the widget itself as a part of the data argument. Use the widget fields directly in the template.

Parameters

templateId - System.String

The ID of the template element for FooterTemplate

Example

Razor
 
             @( Html.Kendo().DropDownTree()
                        .Name("DropDownTree")
                        .FooterTemplateId("footerTemplate")
            )
             

FooterTemplateView(System.Web.Mvc.MvcHtmlString)

The template used to render the footer template. The footer template receives the widget itself as a part of the data argument. Use the widget fields directly in the template.

Parameters

templateView - System.Web.Mvc.MvcHtmlString

The view that contains FooterTemplate

Example

Razor
 
             @( Html.Kendo().DropDownTree()
                        .Name("DropDownTree")
                        .FooterTemplateView(Html.Partial("Template"))
            )
             

FooterTemplateHandler(System.String)

Specifies a JavaScript function name. The value returned by thе function will bе used to render the footer of the dropdowntree.

Parameters

value - System.String

The name of the JavaScript function that will handle the template evaluation.

Example

Razor
 
             @( Html.Kendo().DropDownTree()
                        .Name("DropDownTree")
                        .FooterTemplateHandler("footerTemplateHandler")
            )
             

FooterTemplate(Kendo.Mvc.UI.Fluent.TemplateBuilder)

Defines the template that renders the footer of the DropDownTree.

Parameters

template - TemplateBuilder<TModel>

A Template component that configures the footer.

Example

Razor
 
             @(Html.Kendo().DropDownTree()
                  .Name("dropDownTree")
                  .FooterTemplate(Html.Kendo().Template().AddHtml("Total <strong>${data.instance.dataSource.total()}</strong> items found"))
             )
             

Height(System.String)

The height of the suggestion popup in pixels. The default value is 200 pixels. If set to "Auto" the height of the popup will depend on the height of the treeview.

Parameters

value - System.String

The value for Height

Example

Razor
 
            @(Html.Kendo().DropDownTree()
                        .Name("DropDownTree")
                        .Height("Auto")
            )
             

IgnoreCase(System.Boolean)

If set to false case-sensitive search will be performed to find suggestions. The widget performs case-insensitive searching by default.

Parameters

value - System.Boolean

The value for IgnoreCase

Example

Razor
 
            @(Html.Kendo().DropDownTree()
                        .Name("DropDownTree")
                        .IgnoreCase(false)
            )
             

MinLength(System.Int32)

The minimum number of characters the user must type before a search is performed. Set to a higher value if the search could match a lot of items.

Parameters

value - System.Int32

The value for MinLength

Example

Razor
 
            @(Html.Kendo().DropDownTree()
                        .Name("DropDownTree")
                        .MinLength(3)
            )
             

NoDataTemplate(System.String)

The template used to render the "no data" template, which will be displayed if no results are found or the underlying data source is empty. The noData template receives the widget itself as a part of the data argument. The template will be evaluated on every widget data bound.

Parameters

value - System.String

The value for NoDataTemplate

Example

Razor
 
             @( Html.Kendo().DropDownTree()
                        .Name("DropDownTree")
                        .NoDataTemplate("No items are available")
            )
             

NoDataTemplateId(System.String)

The template used to render the "no data" template, which will be displayed if no results are found or the underlying data source is empty. The noData template receives the widget itself as a part of the data argument. The template will be evaluated on every widget data bound.

Parameters

templateId - System.String

The ID of the template element for NoDataTemplate

Example

Razor
 
             @( Html.Kendo().DropDownTree()
                        .Name("DropDownTree")
                        .NoDataTemplateId("noDataTemplate")
            )
             

NoDataTemplateView(System.Web.Mvc.MvcHtmlString)

The template used to render the "no data" template, which will be displayed if no results are found or the underlying data source is empty. The noData template receives the widget itself as a part of the data argument. The template will be evaluated on every widget data bound.

Parameters

templateView - System.Web.Mvc.MvcHtmlString

The view that contains NoDataTemplate

Example

Razor
 
             @( Html.Kendo().DropDownTree()
                        .Name("DropDownTree")
                        .NoDataTemplateView(Html.Partial("Template"))
            )
             

NoDataTemplateHandler(System.String)

Specifies a JavaScript function name. The value returned by thе function will bе used to render the message when no data loaded in the dropdowntree.

Parameters

value - System.String

The name of the JavaScript function that will handle the template evaluation.

Example

Razor
 
             @( Html.Kendo().DropDownTree()
                        .Name("DropDownTree")
                        .NoDataTemplateHandler("noDataTemplateHandler")
            )
             

NoDataTemplate(Kendo.Mvc.UI.Fluent.TemplateBuilder)

Defines the template that renders the "no data" template, which will be displayed if no results are found or the underlying DataSource is empty. The template will be evaluated on every component's data bound.

Parameters

template - TemplateBuilder<TModel>

A Template component that configures the "no data" template.

Example

Razor
 
             @(Html.Kendo().DropDownTree()
                  .Name("dropDownTree")
                  .NoDataTemplate(Html.Kendo().Template().AddHtml("No available options."))
             )
             

Placeholder(System.String)

The hint displayed by the widget when it is empty. Not set by default.

Parameters

value - System.String

The value for Placeholder

Example

Razor
 
            @(Html.Kendo().DropDownTree()
                        .Name("DropDownTree")
                        .Placeholder("Select an item")
            )
             

Popup(System.Action)

Configures the PopupSettingsBuilder of the widget.

Parameters

popupAction - System.Action<PopupSettingsBuilder>

The PopupSettingsBuilder Action responsible for the configuration of the Popup.

HeaderTemplate(System.String)

Specifies a static HTML content, which will be rendered as a header of the popup element.

Parameters

value - System.String

The value for HeaderTemplate

Example

Razor
 
             @( Html.Kendo().DropDownTree()
                        .Name("DropDownTree")
                        .HeaderTemplate("Custom Header")
            )
             

HeaderTemplateId(System.String)

Specifies a static HTML content, which will be rendered as a header of the popup element.

Parameters

templateId - System.String

The ID of the template element for HeaderTemplate

Example

Razor
 
             @( Html.Kendo().DropDownTree()
                        .Name("DropDownTree")
                        .HeaderTemplateId("headerTemplate")
            )
             

HeaderTemplateView(System.Web.Mvc.MvcHtmlString)

Specifies a static HTML content, which will be rendered as a header of the popup element.

Parameters

templateView - System.Web.Mvc.MvcHtmlString

The view that contains the HeaderTemplate

Example

Razor
 
             @( Html.Kendo().DropDownTree()
                        .Name("DropDownTree")
                        .HeaderTemplateView(Html.Partial("Template"))
            )
             

HeaderTemplateHandler(System.String)

Specifies a JavaScript function name. The value returned by thе function will bе used to render the header content in the dropdowntree.

Parameters

value - System.String

The name of the JavaScript function that will handle the template evaluation.

Example

Razor
 
             @( Html.Kendo().DropDownTree()
                        .Name("DropDownTree")
                        .HeaderTemplateHandler("headerTemplateHandler")
            )
             

HeaderTemplate(Kendo.Mvc.UI.Fluent.TemplateBuilder)

Specifies a static HTML content, which will be rendered as a header of the popup element.

Parameters

template - TemplateBuilder<TModel>

A Template component that configures the header of the popup element.

Example

Razor
 
             @(Html.Kendo().DropDownTree()
                  .Name("dropDownTree")
                  .HeaderTemplate(Html.Kendo().Template().AddHtml("<div>Countries:</div>"))
             )
             

ValueTemplate(System.String)

The template used to render the selected tags.

Parameters

value - System.String

The value for ValueTemplate

Example

Razor
 
             @( Html.Kendo().DropDownTree()
                        .Name("DropDownTree")
                        .ValueTemplate(#= data.Value #)
            )
             

ValueTemplateId(System.String)

The template used to render the selected tags.

Parameters

templateId - System.String

The ID of the template element for ValueTemplate

Example

Razor
 
             @( Html.Kendo().DropDownTree()
                        .Name("DropDownTree")
                        .ValueTemplateId("valueTemplate")
            )
             

ValueTemplateView(System.Web.Mvc.MvcHtmlString)

The template used to render the selected tags.

Parameters

templateView - System.Web.Mvc.MvcHtmlString

The view that contains the ValueTemplate

Example

Razor
 
             @( Html.Kendo().DropDownTree()
                        .Name("DropDownTree")
                        .ValueTemplateView(Html.Partial("Template"))
            )
             

ValueTemplateHandler(System.String)

Specifies a JavaScript function name. The value returned by thе function will bе used to render the selected value of the dropdowntree.

Parameters

value - System.String

The name of the JavaScript function that will handle the template evaluation.

Example

Razor
 
             @( Html.Kendo().DropDownTree()
                        .Name("DropDownTree")
                        .ValueHandler("valueTemplateHandler")
            )
             

ValueTemplate(Kendo.Mvc.UI.Fluent.TemplateBuilder)

Defines the template used to render the selected value of the DropDownTree.

Parameters

template - TemplateBuilder<TModel>

A Template component that configures the selected value template.

Example

Razor
 
             @(Html.Kendo().DropDownTree()
                  .Name("dropDownTree")
                  .ValueTemplate(Html.Kendo().Template().AddHtml("Item: ${data.text}"))
             )
             

TagMode(Kendo.Mvc.UI.TagMode)

Represents available tag modes of DropDownTree. Available configurations are DropDownTreeTagMode.Single and DropDownTreeTagMode.Multiple

Parameters

value - TagMode

The value for TagMode

Example

Razor
 
             @( Html.Kendo().DropDownTree()
                        .Name("DropDownTree")
                        .TagMode(DropDownTreeTagMode.Single)
            )
             

Text(System.String)

The text of the widget used when the autoBind is set to false.

Parameters

value - System.String

The value for Text

Example

Razor
 
            @(Html.Kendo().DropDownTree()
                        .Name("DropDownTree")
                        .AutoBind(false)
                        .Text("Default Text")
            )
             

Value(System.String)

Define the value of the widget. It accepts 'String' when it is in single selection mode.

Parameters

value - System.String

The value string for Value

Example

Razor
 
            @(Html.Kendo().DropDownTree()
                        .Name("DropDownTree")
                        .TagMode(DropDownTreeTagMode.Single)
                        .Value("1")
            )
             

Value(System.Collections.IEnumerable)

Define the value of the widget. It accepts an 'Array' when multiple selection is enabled via checkboxes property.

Parameters

value - System.Collections.IEnumerable

The value array for Value

Example

Razor
 
             @( Html.Kendo().DropDownTree()
                        .Name("DropDownTree")
                        .TagMode(DropDownTreeTagMode.Multiple)
                        .Value(new string[] { "1" })
            )
             

ValuePrimitive(System.Boolean)

Specifies the value binding behavior for the widget. If set to true, the View-Model field will be updated with the selected item value field. If set to false, the View-Model field will be updated with the selected item.

Parameters

value - System.Boolean

The value for ValuePrimitive

Example

Razor
 
            @(Html.Kendo().DropDownTree()
                        .Name("DropDownTree")
                        .ValuePrimitive(true)
            )
             

Filter(System.String)

The filtering method used to determine the suggestions for the current value. Filtration is turned off by default.

Parameters

value - System.String

The value for Filter

Example

Razor
 
            @(Html.Kendo().DropDownTree()
                        .Name("DropDownTree")
                        .ValuePrimitive(true)
            )
             

Size(Kendo.Mvc.UI.ComponentSize)

Sets the size of the component with a parameter of type ComponentSize

Parameters

value - ComponentSize

The value for Size

Example

Razor
 
            @(Html.Kendo().DropDownTree()
                        .Name("DropDownTree")
                        .Size(ComponentSize.Medium)
            )
             

Rounded(Kendo.Mvc.UI.Rounded)

Sets a value controlling the border radius with the Rounded(.

Parameters

value - Rounded

The value for Rounded

Example

Razor
 
            @(Html.Kendo().DropDownTree()
                        .Name("DropDownTree")
                        .Rounded(Rounded.Medium)
            )
             

FillMode(Kendo.Mvc.UI.FillMode)

Sets a value controlling how the color is applied with the FillMode(.

Parameters

value - FillMode

The value for FillMode

Example

Razor
 
            @(Html.Kendo().DropDownTree()
                        .Name("DropDownTree")
                        .FillMode(FillMode.Solid)
            )
             

FilterLabel(System.String)

When filtering is enabled, allows aria-label to be defined for the filter input element.

Parameters

value - System.String

The value for FilterLabel

Example

Razor
 
            @(Html.Kendo().DropDownTree()
                        .Name("DropDownTree")
                        .FilterLabel("Filter")
            )
             

Label(System.Action)

Uses the DropDownTreeLabelSettingsBuilder Action configurator to add a label before the input. If the input has no id attribute, a generated id will be assigned. The string and the function parameters are setting the inner HTML of the label.

Parameters

configurator - System.Action<DropDownTreeLabelSettingsBuilder>

AdaptiveMode(Kendo.Mvc.UI.AdaptiveMode)

Specifies the adaptive rendering of the component.

Parameters

value - AdaptiveMode

The value for AdaptiveMode.

Example

Razor
 
            @(Html.Kendo().DropDownTree()
                        .Name("DropDownTree")
                        .AdaptiveMode(AdaptiveMode.Auto)
            )
             

LoadOnDemand(System.Action)

Indicates whether the child DataSources should be fetched lazily when parent groups get expanded. Setting this to true causes loading the child DataSources when expanding the parent node.

Parameters

configurator - System.Action<DropDownTreeLoadOnDemandSettingsBuilder>

The configurator for the loadondemand setting.

LoadOnDemand()

Indicates whether the child DataSources should be fetched lazily when parent groups get expanded. Setting this to true causes loading the child DataSources when expanding the parent node.

LoadOnDemand(System.Boolean)

Indicates whether the child DataSources should be fetched lazily when parent groups get expanded. Setting this to true causes loading the child DataSources when expanding the parent node.

Parameters

enabled - System.Boolean

Enables or disables the loadondemand option.

ToComponent()

Returns the internal view component.

Name(System.String)

Sets the name of the component.

Parameters

componentName - System.String

The name of the component.

Example

Razor
 
            @(Html.Kendo().Grid<OrderViewModel>()
               .Name("grid")
               .Columns(columns =>
               {
                   columns.Bound(p => p.OrderID).Filterable(false);
                   columns.Bound(p => p.Freight);
               })
               .DataSource(dataSource => dataSource
                   .Ajax()
                   .PageSize(20)
                   .Read(read => read.Action("Orders_Read", "Grid"))
               )
            )
             

Deferred(System.Boolean)

Suppress initialization script rendering. Note that this options should be used in conjunction with

Parameters

deferred - System.Boolean

ModelMetadata(System.Web.Mvc.ModelMetadata)

Uses the Metadata of the Model.

Parameters

modelMetadata - System.Web.Mvc.ModelMetadata

The metadata set for the Model

HtmlAttributes(System.Object)

Sets the HTML attributes.

Parameters

attributes - System.Object

The HTML attributes.

HtmlAttributes(System.Collections.Generic.IDictionary)

Parameters

attributes - System.Collections.Generic.IDictionary<String,Object>

AsModule(System.Boolean)

Specifies whether the initialization script of the component will be rendered as a JavaScript module.

Parameters

value - System.Boolean

Render()

Renders the component.

Example

Razor
 
            @(@Page Inherits="System.Web.Mvc.ViewPage<IEnumerable<Product>>" )
            @( Html.Kendo().Grid(Model)
                .Name("grid")
                .DetailTemplate(product => {
                    )
                       Product Details:
                       <div>Product Name: @( product.ProductName )</div>
                       <div>Units In Stock: @( product.UnitsInStock )</div>
                    @(
                })
                .Render();
            )
             

ScriptAttributes(System.Object,System.Boolean)

Sets the JavaScript attributes to the initialization script.

Parameters

attributes - System.Object

The JavaScript attributes.

overrideAttributes - System.Boolean

Argument which determines whether attributes should be overriden.

ScriptAttributes(System.Collections.Generic.IDictionary,System.Boolean)

Sets the JavaScript attributes to the initialization script.

Parameters

attributes - System.Collections.Generic.IDictionary<String,Object>

The JavaScript attributes.

overrideAttributes - System.Boolean

Argument which determines whether attributes should be overriden.

ToHtmlString()

ToClientTemplate()

In this article
MethodsAutoBind(System.Boolean)AutoClose(System.Boolean)AutoWidth(System.Boolean)CheckAll(System.Boolean)CheckAllTemplate(System.String)CheckAllTemplateId(System.String)CheckAllTemplateView(System.Web.Mvc.MvcHtmlString)CheckAllTemplateHandler(System.String)CheckAllTemplate(Kendo.Mvc.UI.Fluent.TemplateBuilder)Template(System.String)TemplateId(System.String)TemplateView(System.Web.Mvc.MvcHtmlString)TemplateHandler(System.String)Template(Kendo.Mvc.UI.Fluent.TemplateBuilder)Checkboxes(System.Boolean)Checkboxes(System.Action)ClearButton(System.Boolean)Items(System.Action)Events(System.Action)BindTo(System.String,System.Action)BindTo(System.String)BindTo(System.Collections.Generic.IEnumerable)BindTo(System.Collections.Generic.IEnumerable,System.Action)BindTo(System.Collections.IEnumerable,System.Action)Animation(System.Boolean)Animation(System.Action)DataSource(System.Action)DataSource(System.String)DataImageUrlField(System.String)DataSpriteCssClassField(System.String)DataUrlField(System.String)Messages(System.Action)DataTextField(System.String)DataTextField(System.String[])DataValueField(System.String)Delay(System.Int32)Enable(System.Boolean)EnforceMinLength(System.Boolean)FooterTemplate(System.String)FooterTemplateId(System.String)FooterTemplateView(System.Web.Mvc.MvcHtmlString)FooterTemplateHandler(System.String)FooterTemplate(Kendo.Mvc.UI.Fluent.TemplateBuilder)Height(System.String)IgnoreCase(System.Boolean)MinLength(System.Int32)NoDataTemplate(System.String)NoDataTemplateId(System.String)NoDataTemplateView(System.Web.Mvc.MvcHtmlString)NoDataTemplateHandler(System.String)NoDataTemplate(Kendo.Mvc.UI.Fluent.TemplateBuilder)Placeholder(System.String)Popup(System.Action)HeaderTemplate(System.String)HeaderTemplateId(System.String)HeaderTemplateView(System.Web.Mvc.MvcHtmlString)HeaderTemplateHandler(System.String)HeaderTemplate(Kendo.Mvc.UI.Fluent.TemplateBuilder)ValueTemplate(System.String)ValueTemplateId(System.String)ValueTemplateView(System.Web.Mvc.MvcHtmlString)ValueTemplateHandler(System.String)ValueTemplate(Kendo.Mvc.UI.Fluent.TemplateBuilder)TagMode(Kendo.Mvc.UI.TagMode)Text(System.String)Value(System.String)Value(System.Collections.IEnumerable)ValuePrimitive(System.Boolean)Filter(System.String)Size(Kendo.Mvc.UI.ComponentSize)Rounded(Kendo.Mvc.UI.Rounded)FillMode(Kendo.Mvc.UI.FillMode)FilterLabel(System.String)Label(System.Action)AdaptiveMode(Kendo.Mvc.UI.AdaptiveMode)LoadOnDemand(System.Action)LoadOnDemand()LoadOnDemand(System.Boolean)ToComponent()Name(System.String)Deferred(System.Boolean)ModelMetadata(System.Web.Mvc.ModelMetadata)HtmlAttributes(System.Object)HtmlAttributes(System.Collections.Generic.IDictionary)AsModule(System.Boolean)Render()ScriptAttributes(System.Object,System.Boolean)ScriptAttributes(System.Collections.Generic.IDictionary,System.Boolean)ToHtmlString()ToClientTemplate()
Not finding the help you need?
Contact Support