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

Defines the fluent API for configuring the Kendo UI DropDownTree

Definition

Namespace:Kendo.Mvc.UI.Fluent

Assembly:Kendo.Mvc.dll

Syntax:

C#
public class DropDownTreeBuilder : MvvmWidgetBuilderBase<DropDownTree, DropDownTreeBuilder>, IHtmlContent

Inheritance: objectHelperResultWidgetBuilderBase<DropDownTree, DropDownTreeBuilder>MvvmWidgetBuilderBase<DropDownTree, DropDownTreeBuilder>DropDownTreeBuilder

Implements: IHtmlContent

Inherited Members MvvmWidgetBuilderBase<DropDownTree, DropDownTreeBuilder>.UseMvvmInitialization(bool)MvvmWidgetBuilderBase<DropDownTree, DropDownTreeBuilder>.UseMvvmInitialization()WidgetBuilderBase<DropDownTree, DropDownTreeBuilder>.ToComponent()WidgetBuilderBase<DropDownTree, DropDownTreeBuilder>.Expression(string)WidgetBuilderBase<DropDownTree, DropDownTreeBuilder>.Explorer(ModelExplorer)WidgetBuilderBase<DropDownTree, DropDownTreeBuilder>.Name(string)WidgetBuilderBase<DropDownTree, DropDownTreeBuilder>.Deferred(bool)WidgetBuilderBase<DropDownTree, DropDownTreeBuilder>.HtmlAttributes(object)WidgetBuilderBase<DropDownTree, DropDownTreeBuilder>.HtmlAttributes(IDictionary<string, object>)WidgetBuilderBase<DropDownTree, DropDownTreeBuilder>.ScriptAttributes(object, bool)WidgetBuilderBase<DropDownTree, DropDownTreeBuilder>.ScriptAttributes(IDictionary<string, object>, bool)WidgetBuilderBase<DropDownTree, DropDownTreeBuilder>.Render()WidgetBuilderBase<DropDownTree, DropDownTreeBuilder>.ToHtmlString()WidgetBuilderBase<DropDownTree, DropDownTreeBuilder>.WriteTo(TextWriter, HtmlEncoder)WidgetBuilderBase<DropDownTree, DropDownTreeBuilder>.ToClientTemplate()WidgetBuilderBase<DropDownTree, DropDownTreeBuilder>.AsModule(bool)WidgetBuilderBase<DropDownTree, DropDownTreeBuilder>.ComponentWidgetBuilderBase<DropDownTree, DropDownTreeBuilder>.ContainerHelperResult.WriteTo(TextWriter, HtmlEncoder)HelperResult.WriteActionobject.GetType()object.MemberwiseClone()object.ToString()object.Equals(object)object.Equals(object, object)object.ReferenceEquals(object, object)object.GetHashCode()...

Constructors

Initializes a new instance of the DropDownTreeBuilder class.

C#
public DropDownTreeBuilder(DropDownTree component)
Parameters:componentDropDownTree

Methods

Specifies the adaptive rendering of the component.

C#
public DropDownTreeBuilder AdaptiveMode(AdaptiveMode value)
Parameters:valueAdaptiveMode

The value for AdaptiveMode

Returns:

DropDownTreeBuilder

Returns the current DropDownTreeBuilder instance.

Example:
C#
@(Html.Kendo().DropDownTree()
.Name("DropDownTree")
.AdaptiveMode(AdaptiveMode.Auto)
)

Allows customization of the subtitle's text in the adaptive view of the component.

C#
public DropDownTreeBuilder AdaptiveSubtitle(string value)
Parameters:valuestring

The value for AdaptiveSubtitle

Returns:

DropDownTreeBuilder

Returns the current DropDownTreeBuilder instance.

Allows customization of the title's text in the adaptive view of the component.

C#
public DropDownTreeBuilder AdaptiveTitle(string value)
Parameters:valuestring

The value for AdaptiveTitle

Returns:

DropDownTreeBuilder

Returns the current DropDownTreeBuilder instance.

Configures the animation effects of the widget.

C#
public DropDownTreeBuilder Animation(Action<PopupAnimationBuilder> animationAction)
Parameters:animationActionAction<PopupAnimationBuilder>

The action which configures the animation effects.

Returns:

DropDownTreeBuilder

Returns the current instance of DropDownTreeBuilder to allow method chaining.

Example:
C#
@( Html.Kendo().DropDownTree()
.Name("DropDownTree")
.Animation(animation =&gt;
{
animation.Open(open =&gt;
{
open.SlideIn(SlideDirection.Down);
})
})
)

Use to enable or disable animation of the popup element.

C#
public DropDownTreeBuilder Animation(bool enable)
Parameters:enablebool

The boolean value.

Returns:

DropDownTreeBuilder

Returns the current instance of DropDownTreeBuilder to allow method chaining.

Example:
C#
@( Html.Kendo().DropDownTree()
.Name("DropDownTree")
.Animation(false) //toggle effect
)

Controls whether to bind the widget to the data source on initialization.

C#
public DropDownTreeBuilder AutoBind(bool value)
Parameters:valuebool

The value for AutoBind

Returns:

DropDownTreeBuilder

Returns the current DropDownTreeBuilder instance.

Example:
C#
@( Html.Kendo().DropDownTree()
.Name("DropDownTree")
.AutoBind(false)
)

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

C#
public DropDownTreeBuilder AutoClose(bool value)
Parameters:valuebool

The value for AutoClose

Returns:

DropDownTreeBuilder

Returns the current DropDownTreeBuilder instance.

Example:
C#
@( Html.Kendo().DropDownTree()
.Name("DropDownTree")
.AutoClose(true)
)

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

C#
public DropDownTreeBuilder AutoWidth(bool value)
Parameters:valuebool

The value for AutoWidth

Returns:

DropDownTreeBuilder

Returns the current DropDownTreeBuilder instance.

Example:
C#
@( Html.Kendo().DropDownTree()
.Name("DropDownTree")
.AutoWidth(true)
)

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

C#
public DropDownTreeBuilder BindTo(IEnumerable dataSource, Action<NavigationBindingFactory<DropDownTreeItem>> factoryAction)
Parameters:dataSourceIEnumerable

The data source.

factoryActionAction<NavigationBindingFactory<DropDownTreeItem>>

The action which will configure the mappings

Returns:

DropDownTreeBuilder

Returns the current instance of DropDownTreeBuilder to allow method chaining.

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

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.

C#
public DropDownTreeBuilder BindTo(IEnumerable<DropDownTreeItemModel> items)
Parameters:itemsIEnumerable<DropDownTreeItemModel>

The list of items

Returns:

DropDownTreeBuilder

Returns the current instance of DropDownTreeBuilder to allow method chaining.

Example:
C#
@( Html.Kendo().DropDownTree()
.Name("DropDownTree")
.BindTo(model)
)

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.

C#
public DropDownTreeBuilder BindTo<T>(IEnumerable<T> dataSource, Action<DropDownTreeItem, T> itemDataBound)
Parameters:dataSourceIEnumerable<T>

The data source.

itemDataBoundAction<DropDownTreeItem, T>

The action executed for every data bound item.

Returns:

DropDownTreeBuilder

Returns the current instance of DropDownTreeBuilder to allow method chaining.

Example:
C#
@( Html.Kendo().DropDownTree()
.Name("DropDownTree")
.BindTo(new []{"First", "Second"}, (item, value) =&gt;
{
item.Text = value;
})
)

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.

C#
public DropDownTreeBuilder CheckAll()
Returns:

DropDownTreeBuilder

Returns the current DropDownTreeBuilder instance.

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.

C#
public DropDownTreeBuilder CheckAll(bool value)
Parameters:valuebool

The value for CheckAll

Returns:

DropDownTreeBuilder

Returns the current DropDownTreeBuilder instance.

Example:
C#
@( Html.Kendo().DropDownTree()
.Name("DropDownTree")
.CheckAll(true)
.Checkboxes(true)
)

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

C#
public DropDownTreeBuilder CheckAllTemplate(string value)
Parameters:valuestring

The value for CheckAllTemplate

Returns:

DropDownTreeBuilder

Returns the current DropDownTreeBuilder instance.

Example:
C#
@(Html.Kendo().DropDownTree()
.Name("dropDownTree")
.CheckAll(true)
.CheckAllTemplate(Html.Kendo().Template().AddHtml("&lt;h2&gt;Check ALL items&lt;/h2&gt;"))
)

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

C#
public DropDownTreeBuilder CheckAllTemplate<TModel>(TemplateBuilder<TModel> template)
Parameters:templateTemplateBuilder<TModel>

A Template component that configures the checkalltemplate.

Returns:

DropDownTreeBuilder

Returns the current DropDownTreeBuilder instance.

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

C#
public DropDownTreeBuilder CheckAllTemplateHandler(string templateHandler)
Parameters:templateHandlerstring

The handler that returs the template for CheckAllTemplate

Returns:

DropDownTreeBuilder

Returns the current DropDownTreeBuilder instance.

Example:
C#
@( Html.Kendo().DropDownTree()
.Name("DropDownTree")
.CheckAllTemplateHandler("checkAllTemplateHandler")
)

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

C#
public DropDownTreeBuilder CheckAllTemplateId(string templateId)
Parameters:templateIdstring

The ID of the template element for CheckAllTemplate

Returns:

DropDownTreeBuilder

Returns the current DropDownTreeBuilder instance.

Example:
C#
@( Html.Kendo().DropDownTree()
.Name("DropDownTree")
.TemplateId("widgetTemplateId")
)

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

C#
public DropDownTreeBuilder CheckAllTemplateView(IHtmlContent templateView)
Parameters:templateViewIHtmlContent

The view that contains the template for CheckAllTemplate

Returns:

DropDownTreeBuilder

Returns the current DropDownTreeBuilder instance.

Example:
C#
@( Html.Kendo().DropDownTree()
.Name("DropDownTree")
.CheckAllTemplateView(Html.Partial("TemplateView"))
)

If true or an object, renders checkboxes beside each node. In this case the widget value should be an array.

C#
public DropDownTreeBuilder Checkboxes(Action<DropDownTreeCheckboxesSettingsBuilder> configurator)
Parameters:configuratorAction<DropDownTreeCheckboxesSettingsBuilder>

The DropDownTreeCheckboxesSettingsBuilder for the checkboxes setting.

Returns:

DropDownTreeBuilder

Returns the current instance of DropDownTreeBuilder .

If true or an object, renders checkboxes beside each node. In this case the widget value should be an array.

C#
public DropDownTreeBuilder Checkboxes(bool enabled)
Parameters:enabledbool

Enables or disables the checkboxes option.

Returns:

DropDownTreeBuilder

Returns the current instance of DropDownTreeCheckboxesSettingsBuilder .

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.

C#
public DropDownTreeBuilder ClearButton(bool value)
Parameters:valuebool

The value for ClearButton

Returns:

DropDownTreeBuilder

Returns the current DropDownTreeBuilder instance.

Example:
C#
@( Html.Kendo().DropDownTree()
.Name("DropDownTree")
.ClearButton(false)
)

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

C#
public DropDownTreeBuilder DataImageUrlField(string value)
Parameters:valuestring

The value for DataImageUrlField

Returns:

DropDownTreeBuilder

Returns the current DropDownTreeBuilder instance.

Example:
C#
@( Html.Kendo().DropDownTree()
.Name("DropDownTree")
.DataImageUrlField("ImageUrl")
)

Configure the DataSource of the component

C#
public DropDownTreeBuilder DataSource(Action<HierarchicalDataSourceBuilder<object>> configurator)
Parameters:configuratorAction<HierarchicalDataSourceBuilder<object>>

The action that configures the DataSource(Action<HierarchicalDataSourceBuilder<object>>).

Returns:

DropDownTreeBuilder

Returns the current instance of DropDownTreeBuilder to allow method chaining.

Example:
C#
@( Html.Kendo().DropDownTree()
.Name("DropDownTree")
.DataSource(dataSource =&gt; dataSource
.Read(read =&gt; read
.Action("Employees", "DropDownTree")
)
)
)

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

C#
public DropDownTreeBuilder DataSource(string dataSourceId)
Parameters:dataSourceIdstringReturns:

DropDownTreeBuilder

Returns the current instance of DropDownTreeBuilder to allow method chaining.

Example:
C#
@( Html.Kendo().DropDownTree()
.Name("DropDownTree")
.DataSource("dataSourceName")
)

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.

C#
public DropDownTreeBuilder DataSpriteCssClassField(string value)
Parameters:valuestring

The value for DataSpriteCssClassField

Returns:

DropDownTreeBuilder

Returns the current DropDownTreeBuilder instance.

Example:
C#
@( Html.Kendo().DropDownTree()
.Name("DropDownTree")
.DataSpriteCssClassField("SpriteCssClass")
)

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.

C#
public DropDownTreeBuilder DataTextField(params string[] value)
Parameters:valuestring[]

The value for DataTextField

Returns:

DropDownTreeBuilder

Returns the current instance of DropDownTreeBuilder to allow method chaining.

Example:
C#
@( Html.Kendo().DropDownTree()
.Name("DropDownTree")
.DataTextField("Name")
)

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.

C#
public DropDownTreeBuilder DataTextField(string value)
Parameters:valuestring

The value for DataTextField

Returns:

DropDownTreeBuilder

Returns the current DropDownTreeBuilder instance.

Example:
C#
@( Html.Kendo().DropDownTree()
.Name("DropDownTree")
.DataTextField([{"Name"}])
)

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

C#
public DropDownTreeBuilder DataUrlField(string value)
Parameters:valuestring

The value for DataUrlField

Returns:

DropDownTreeBuilder

Returns the current DropDownTreeBuilder instance.

Example:
C#
@( Html.Kendo().DropDownTree()
.Name("DropDownTree")
.DataUrlField("Url")
)

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.

C#
public DropDownTreeBuilder DataValueField(string value)
Parameters:valuestring

The value for DataValueField

Returns:

DropDownTreeBuilder

Returns the current DropDownTreeBuilder instance.

Example:
C#
@( Html.Kendo().DropDownTree()
.Name("DropDownTree")
.DataValueField("Value")
)

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

C#
public DropDownTreeBuilder Delay(double value)
Parameters:valuedouble

The value for Delay

Returns:

DropDownTreeBuilder

Returns the current DropDownTreeBuilder instance.

Example:
C#
@( Html.Kendo().DropDownTree()
.Name("DropDownTree")
.Delay(300)
)

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.

C#
public DropDownTreeBuilder Enable(bool value)
Parameters:valuebool

The value for Enable

Returns:

DropDownTreeBuilder

Returns the current DropDownTreeBuilder instance.

Example:
C#
@(Html.Kendo().DropDownTree()
.Name("DropDownTree")
.Enable(false)
)

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.

C#
public DropDownTreeBuilder EnforceMinLength()
Returns:

DropDownTreeBuilder

Returns the current DropDownTreeBuilder instance.

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.

C#
public DropDownTreeBuilder EnforceMinLength(bool value)
Parameters:valuebool

The value for EnforceMinLength

Returns:

DropDownTreeBuilder

Returns the current DropDownTreeBuilder instance.

Example:
C#
@(Html.Kendo().DropDownTree()
.Name("DropDownTree")
.MinLength(3)
.EnforceMinLength(true)
)

Configures the client-side events.

C#
public DropDownTreeBuilder Events(Action<DropDownTreeEventBuilder> configurator)
Parameters:configuratorAction<DropDownTreeEventBuilder>

The client events action.

Returns:

DropDownTreeBuilder

Returns the current DropDownTreeBuilder instance.

Example:
C#
@(Html.Kendo().DropDownTree()
.Name("DropDownTree")
.Events(events =&gt; events
.Change("onChange")
)
)

Sets a value controlling how the color is applied.

C#
public DropDownTreeBuilder FillMode(FillMode value)
Parameters:valueFillMode

The value for FillMode

Returns:

DropDownTreeBuilder

Returns the current DropDownTreeBuilder instance.

Example:
C#
@(Html.Kendo().DropDownTree()
.Name("DropDownTree")
.FillMode(FillMode.Solid)
)

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

C#
public DropDownTreeBuilder Filter(FilterType value)
Parameters:valueFilterType

The value for Filter

Returns:

DropDownTreeBuilder

Returns the current DropDownTreeBuilder instance.

Example:
C#
@(Html.Kendo().DropDownTree()
.Name("DropDownTree")
.ValuePrimitive(true)
)

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

C#
public DropDownTreeBuilder FilterLabel(string value)
Parameters:valuestring

The value for FilterLabel

Returns:

DropDownTreeBuilder

Returns the current DropDownTreeBuilder instance.

Example:
C#
@(Html.Kendo().DropDownTree()
.Name("DropDownTree")
.FilterLabel("Filter")
)

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.

C#
public DropDownTreeBuilder FooterTemplate(string value)
Parameters:valuestring

The value for FooterTemplate

Returns:

DropDownTreeBuilder

Returns the current DropDownTreeBuilder instance.

Example:
C#
@(Html.Kendo().DropDownTree()
.Name("dropDownTree")
.FooterTemplate(Html.Kendo().Template().AddHtml("Total &lt;strong&gt;${data.instance.dataSource.total()}&lt;/strong&gt; items found"))
)

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.

C#
public DropDownTreeBuilder FooterTemplate<TModel>(TemplateBuilder<TModel> template)
Parameters:templateTemplateBuilder<TModel>

A Template component that configures the footertemplate.

Returns:

DropDownTreeBuilder

Returns the current DropDownTreeBuilder instance.

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.

C#
public DropDownTreeBuilder FooterTemplateHandler(string templateHandler)
Parameters:templateHandlerstring

The handler that returs the template for FooterTemplate

Returns:

DropDownTreeBuilder

Returns the current DropDownTreeBuilder instance.

Example:
C#
@( Html.Kendo().DropDownTree()
.Name("DropDownTree")
.FooterTemplateHandler("footerTemplateHandler")
)

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.

C#
public DropDownTreeBuilder FooterTemplateId(string templateId)
Parameters:templateIdstring

The ID of the template element for FooterTemplate

Returns:

DropDownTreeBuilder

Returns the current DropDownTreeBuilder instance.

Example:
C#
@( Html.Kendo().DropDownTree()
.Name("DropDownTree")
.FooterTemplateId("footerTemplate")
)

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.

C#
public DropDownTreeBuilder FooterTemplateView(IHtmlContent templateView)
Parameters:templateViewIHtmlContent

The view that contains the template for FooterTemplate

Returns:

DropDownTreeBuilder

Returns the current DropDownTreeBuilder instance.

Example:
C#
@( Html.Kendo().DropDownTree()
.Name("DropDownTree")
.FooterTemplateView(Html.Partial("Template"))
)

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

C#
public DropDownTreeBuilder HeaderTemplate(string value)
Parameters:valuestring

The value for HeaderTemplate

Returns:

DropDownTreeBuilder

Returns the current DropDownTreeBuilder instance.

Example:
C#
@(Html.Kendo().DropDownTree()
.Name("dropDownTree")
.HeaderTemplate(Html.Kendo().Template().AddHtml("&lt;div&gt;Countries:&lt;/div&gt;"))
)

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

C#
public DropDownTreeBuilder HeaderTemplate<TModel>(TemplateBuilder<TModel> template)
Parameters:templateTemplateBuilder<TModel>

A Template component that configures the headertemplate.

Returns:

DropDownTreeBuilder

Returns the current DropDownTreeBuilder instance.

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

C#
public DropDownTreeBuilder HeaderTemplateHandler(string templateHandler)
Parameters:templateHandlerstring

The handler that returs the template for HeaderTemplate

Returns:

DropDownTreeBuilder

Returns the current DropDownTreeBuilder instance.

Example:
C#
@( Html.Kendo().DropDownTree()
.Name("DropDownTree")
.HeaderTemplateHandler("headerTemplateHandler")
)

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

C#
public DropDownTreeBuilder HeaderTemplateId(string templateId)
Parameters:templateIdstring

The ID of the template element for HeaderTemplate

Returns:

DropDownTreeBuilder

Returns the current DropDownTreeBuilder instance.

Example:
C#
@( Html.Kendo().DropDownTree()
.Name("DropDownTree")
.HeaderTemplateId("headerTemplate")
)

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

C#
public DropDownTreeBuilder HeaderTemplateView(IHtmlContent templateView)
Parameters:templateViewIHtmlContent

The view that contains the template for HeaderTemplate

Returns:

DropDownTreeBuilder

Returns the current DropDownTreeBuilder instance.

Example:
C#
@( Html.Kendo().DropDownTree()
.Name("DropDownTree")
.HeaderTemplateView(Html.Partial("Template"))
)

Sets max-height of the embedded treeview 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.

C#
public DropDownTreeBuilder Height(string value)
Parameters:valuestring

The value for Height

Returns:

DropDownTreeBuilder

Returns the current DropDownTreeBuilder instance.

Example:
C#
@(Html.Kendo().DropDownTree()
.Name("DropDownTree")
.Height("Auto")
)

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

C#
public DropDownTreeBuilder IgnoreCase(bool value)
Parameters:valuebool

The value for IgnoreCase

Returns:

DropDownTreeBuilder

Returns the current DropDownTreeBuilder instance.

Example:
C#
@(Html.Kendo().DropDownTree()
.Name("DropDownTree")
.IgnoreCase(false)
)

Defines the items in the DropDownTree

C#
public DropDownTreeBuilder Items(Action<DropDownTreeItemFactory> addAction)
Parameters:addActionAction<DropDownTreeItemFactory>

The add action.

Returns:

DropDownTreeBuilder

Returns the current instance of DropDownTreeBuilder to allow method chaining.

Example:
C#
@( Html.Kendo().DropDownTree()
.Name("DropDownTree")
.Items(items =&gt;
{
items.Add().Text("First Item");
items.Add().Text("Second Item");
})
)

Adds 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.

C#
public DropDownTreeBuilder Label(Action<DropDownTreeLabelSettingsBuilder> configurator)
Parameters:configuratorAction<DropDownTreeLabelSettingsBuilder>

The DropDownTreeLabelSettingsBuilder for the label setting.

Returns:

DropDownTreeBuilder

Returns the current instance of DropDownTreeBuilder .

Adds 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.

C#
public DropDownTreeBuilder Label(string label)
Parameters:labelstring

The label.

Returns:

DropDownTreeBuilder

Returns the current instance of DropDownTreeBuilder .

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.

C#
public DropDownTreeBuilder LoadOnDemand()
Returns:

DropDownTreeBuilder

Returns the current instance of DropDownTreeLoadOnDemandSettingsBuilder .

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.

C#
public DropDownTreeBuilder LoadOnDemand(Action<DropDownTreeLoadOnDemandSettingsBuilder> configurator)
Parameters:configuratorAction<DropDownTreeLoadOnDemandSettingsBuilder>

The DropDownTreeLoadOnDemandSettingsBuilder for the loadondemand setting.

Returns:

DropDownTreeBuilder

Returns the current instance of DropDownTreeBuilder .

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.

C#
public DropDownTreeBuilder LoadOnDemand(bool enabled)
Parameters:enabledbool

Enables or disables the loadondemand option.

Returns:

DropDownTreeBuilder

Returns the current instance of DropDownTreeLoadOnDemandSettingsBuilder .

The text messages displayed in the widget. Use it to customize or localize the messages.

C#
public DropDownTreeBuilder Messages(Action<DropDownTreeMessagesSettingsBuilder> configurator)
Parameters:configuratorAction<DropDownTreeMessagesSettingsBuilder>

The DropDownTreeMessagesSettingsBuilder for the messages setting.

Returns:

DropDownTreeBuilder

Returns the current instance of DropDownTreeBuilder .

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.

C#
public DropDownTreeBuilder MinLength(double value)
Parameters:valuedouble

The value for MinLength

Returns:

DropDownTreeBuilder

Returns the current DropDownTreeBuilder instance.

Example:
C#
@(Html.Kendo().DropDownTree()
.Name("DropDownTree")
.MinLength(3)
)

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.

C#
public DropDownTreeBuilder NoDataTemplate(string value)
Parameters:valuestring

The value for NoDataTemplate

Returns:

DropDownTreeBuilder

Returns the current DropDownTreeBuilder instance.

Example:
C#
@(Html.Kendo().DropDownTree()
.Name("dropDownTree")
.NoDataTemplate(Html.Kendo().Template().AddHtml("No available options."))
)

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.

C#
public DropDownTreeBuilder NoDataTemplate<TModel>(TemplateBuilder<TModel> template)
Parameters:templateTemplateBuilder<TModel>

A Template component that configures the nodatatemplate.

Returns:

DropDownTreeBuilder

Returns the current DropDownTreeBuilder instance.

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.

C#
public DropDownTreeBuilder NoDataTemplateHandler(string templateHandler)
Parameters:templateHandlerstring

The handler that returs the template for NoDataTemplate

Returns:

DropDownTreeBuilder

Returns the current DropDownTreeBuilder instance.

Example:
C#
@( Html.Kendo().DropDownTree()
.Name("DropDownTree")
.NoDataTemplateHandler("noDataTemplateHandler")
)

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.

C#
public DropDownTreeBuilder NoDataTemplateId(string templateId)
Parameters:templateIdstring

The ID of the template element for NoDataTemplate

Returns:

DropDownTreeBuilder

Returns the current DropDownTreeBuilder instance.

Example:
C#
@( Html.Kendo().DropDownTree()
.Name("DropDownTree")
.NoDataTemplateId("noDataTemplate")
)

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.

C#
public DropDownTreeBuilder NoDataTemplateView(IHtmlContent templateView)
Parameters:templateViewIHtmlContent

The view that contains the template for NoDataTemplate

Returns:

DropDownTreeBuilder

Returns the current DropDownTreeBuilder instance.

Example:
C#
@( Html.Kendo().DropDownTree()
.Name("DropDownTree")
.NoDataTemplateView(Html.Partial("Template"))
)

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

C#
public DropDownTreeBuilder Placeholder(string value)
Parameters:valuestring

The value for Placeholder

Returns:

DropDownTreeBuilder

Returns the current DropDownTreeBuilder instance.

Example:
C#
@(Html.Kendo().DropDownTree()
.Name("DropDownTree")
.Placeholder("Select an item")
)

The options that will be used for the popup initialization. For more details about the available options refer to Popup documentation.

C#
public DropDownTreeBuilder Popup(Action<DropDownTreePopupSettingsBuilder> configurator)
Parameters:configuratorAction<DropDownTreePopupSettingsBuilder>

The DropDownTreePopupSettingsBuilder for the popup setting.

Returns:

DropDownTreeBuilder

Returns the current instance of DropDownTreeBuilder .

Sets a value controlling the border radius.

C#
public DropDownTreeBuilder Rounded(Rounded value)
Parameters:valueRounded

The value for Rounded

Returns:

DropDownTreeBuilder

Returns the current DropDownTreeBuilder instance.

Example:
C#
@(Html.Kendo().DropDownTree()
.Name("DropDownTree")
.Rounded(Rounded.Medium)
)

Sets the size of the component.

C#
public DropDownTreeBuilder Size(ComponentSize value)
Parameters:valueComponentSize

The value for Size

Returns:

DropDownTreeBuilder

Returns the current DropDownTreeBuilder instance.

Example:
C#
@(Html.Kendo().DropDownTree()
.Name("DropDownTree")
.Size(ComponentSize.Medium)
)

Represents available tag modes of DropDownTree.

C#
public DropDownTreeBuilder TagMode(DropDownTreeTagMode value)
Parameters:valueDropDownTreeTagMode

The value for TagMode

Returns:

DropDownTreeBuilder

Returns the current DropDownTreeBuilder instance.

Example:
C#
@( Html.Kendo().DropDownTree()
.Name("DropDownTree")
.TagMode(DropDownTreeTagMode.Single)
)

Template for rendering each node.

C#
public DropDownTreeBuilder Template(string value)
Parameters:valuestring

The value for Template

Returns:

DropDownTreeBuilder

Returns the current DropDownTreeBuilder instance.

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

Template for rendering each node.

C#
public DropDownTreeBuilder Template<TModel>(TemplateBuilder<TModel> template)
Parameters:templateTemplateBuilder<TModel>

A Template component that configures the template.

Returns:

DropDownTreeBuilder

Returns the current DropDownTreeBuilder instance.

Template for rendering each node.

C#
public DropDownTreeBuilder TemplateHandler(string templateHandler)
Parameters:templateHandlerstring

The handler that returs the template for Template

Returns:

DropDownTreeBuilder

Returns the current DropDownTreeBuilder instance.

Example:
C#
@( Html.Kendo().DropDownTree()
.Name("DropDownTree")
.TemplateHandler("templateHandler")
)

Template for rendering each node.

C#
public DropDownTreeBuilder TemplateId(string templateId)
Parameters:templateIdstring

The ID of the template element for Template

Returns:

DropDownTreeBuilder

Returns the current DropDownTreeBuilder instance.

Example:
C#
@( Html.Kendo().DropDownTree()
.Name("DropDownTree")
.TemplateId("widgetTemplateId")
)

Template for rendering each node.

C#
public DropDownTreeBuilder TemplateView(IHtmlContent templateView)
Parameters:templateViewIHtmlContent

The view that contains the template for Template

Returns:

DropDownTreeBuilder

Returns the current DropDownTreeBuilder instance.

Example:
C#
@( Html.Kendo().DropDownTree()
.Name("DropDownTree")
.TemplateView(Html.Partial("TemplateView"))
)

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

C#
public DropDownTreeBuilder Text(string value)
Parameters:valuestring

The value for Text

Returns:

DropDownTreeBuilder

Returns the current DropDownTreeBuilder instance.

Example:
C#
@(Html.Kendo().DropDownTree()
.Name("DropDownTree")
.AutoBind(false)
.Text("Default Text")
)

Sets the value of the widget.

C#
public DropDownTreeBuilder Value(IEnumerable value)
Parameters:valueIEnumerableReturns:

DropDownTreeBuilder

Returns the current instance of DropDownTreeBuilder to allow method chaining.

Example:
C#
@( Html.Kendo().DropDownTree()
.Name("DropDownTree")
.Value(new string[] { "1" })
)

Define the value of the widget. It accepts 'String' when it is in single selection mode and 'Array' when multiple selection is enabled via checkboxes property.

C#
public DropDownTreeBuilder Value(string value)
Parameters:valuestring

The value for Value

Returns:

DropDownTreeBuilder

Returns the current DropDownTreeBuilder instance.

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

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.

C#
public DropDownTreeBuilder ValuePrimitive()
Returns:

DropDownTreeBuilder

Returns the current DropDownTreeBuilder instance.

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.

C#
public DropDownTreeBuilder ValuePrimitive(bool value)
Parameters:valuebool

The value for ValuePrimitive

Returns:

DropDownTreeBuilder

Returns the current DropDownTreeBuilder instance.

Example:
C#
@(Html.Kendo().DropDownTree()
.Name("DropDownTree")
.ValuePrimitive(true)
)

The template used to render the value and the or the selected tags.

C#
public DropDownTreeBuilder ValueTemplate(string value)
Parameters:valuestring

The value for ValueTemplate

Returns:

DropDownTreeBuilder

Returns the current DropDownTreeBuilder instance.

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

The template used to render the value and the or the selected tags.

C#
public DropDownTreeBuilder ValueTemplate<TModel>(TemplateBuilder<TModel> template)
Parameters:templateTemplateBuilder<TModel>

A Template component that configures the valuetemplate.

Returns:

DropDownTreeBuilder

Returns the current DropDownTreeBuilder instance.

The template used to render the value and the or the selected tags.

C#
public DropDownTreeBuilder ValueTemplateHandler(string templateHandler)
Parameters:templateHandlerstring

The handler that returs the template for ValueTemplate

Returns:

DropDownTreeBuilder

Returns the current DropDownTreeBuilder instance.

Example:
C#
@( Html.Kendo().DropDownTree()
.Name("DropDownTree")
.ValueHandler("valueTemplateHandler")
)

The template used to render the value and the or the selected tags.

C#
public DropDownTreeBuilder ValueTemplateId(string templateId)
Parameters:templateIdstring

The ID of the template element for ValueTemplate

Returns:

DropDownTreeBuilder

Returns the current DropDownTreeBuilder instance.

Example:
C#
@( Html.Kendo().DropDownTree()
.Name("DropDownTree")
.ValueTemplateId("valueTemplate")
)

The template used to render the value and the or the selected tags.

C#
public DropDownTreeBuilder ValueTemplateView(IHtmlContent templateView)
Parameters:templateViewIHtmlContent

The view that contains the template for ValueTemplate

Returns:

DropDownTreeBuilder

Returns the current DropDownTreeBuilder instance.

Example:
C#
@( Html.Kendo().DropDownTree()
.Name("DropDownTree")
.ValueTemplateView(Html.Partial("Template"))
)