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

Defines the fluent interface for configuring child DropDownTree items.

Definition

Namespace:Kendo.Mvc.UI.Fluent

Assembly:Kendo.Mvc.dll

Syntax:

C#
public class DropDownTreeCheckboxesBuilder

Inheritance: objectDropDownTreeCheckboxesBuilder

Inherited Members object.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 DropDownTreeCheckboxesBuilder class.

C#
public DropDownTreeCheckboxesBuilder(DropDownTreeCheckboxesSettings settings)
Parameters:settingsDropDownTreeCheckboxesSettings

The checkbox settings.

Methods

Enable/disable checking of child checkboxes in the dropdowntree.

C#
public virtual DropDownTreeCheckboxesBuilder CheckChildren(bool checkChildren)
Parameters:checkChildrenbool

Whether checking of parent checkboxes should check child checkboxes.

Returns:

DropDownTreeCheckboxesBuilder

Example:
C#
@( Html.Kendo().DropDownTree()
.Name("DropDownTree")
.Checkboxes(config => config
.CheckChildren(true)
)
)

Enable/disable rendering of checkboxes in the dropdowntree.

C#
public virtual DropDownTreeCheckboxesBuilder Enabled(bool enabled)
Parameters:enabledbool

Whether checkboxes should be rendered.

Returns:

DropDownTreeCheckboxesBuilder

Example:
C#
@( Html.Kendo().DropDownTree()
.Name("DropDownTree")
.Checkboxes(config => config
.Enabled(true)
)
)

The name attribute of the checkbox fields. This will correlate to the name of the action method parameter that the nodes are posted to.

C#
public DropDownTreeCheckboxesBuilder Name(string name)
Parameters:namestring

The string that will be used in the name attribute.

Returns:

DropDownTreeCheckboxesBuilder

Example:
C#
@( Html.Kendo().DropDownTree()
.Name("DropDownTree")
.Checkboxes(config => config
.Name("checkedNodes")
)
)

Client-side template to be used for rendering the items in the dropdowntree.

C#
public DropDownTreeCheckboxesBuilder Template(string template)
Parameters:templatestringReturns:

DropDownTreeCheckboxesBuilder

Example:
C#
@( Html.Kendo().DropDownTree()
.Name("DropDownTree")
.Checkboxes(config => config
.Template("#= data #")
)
)

Defines the template, which renders the checkboxes.

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

A Template component that configures checkboxes template.

Returns:

DropDownTreeCheckboxesBuilder

Example:
C#
@(Html.Kendo().DropDownTree()
.Name("dropDownTree")
.Checkboxes(checkboxes =&gt; checkboxes
.Name("checkedFiles")
.CheckChildren(true)
.Template(Html.Kendo().Template().AddHtml("&lt;input type='checkbox' name='checkedFiles[${data.item.id}]' value='true' /&gt;"))
)
)

Specifies a JavaScript function name. The value returned by thе function will бе used to render the item checkboxes in the dropdowntree.

C#
public DropDownTreeCheckboxesBuilder TemplateHandler(string value)
Parameters:valuestring

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

Returns:

DropDownTreeCheckboxesBuilder

Example:
C#
@( Html.Kendo().DropDownTree()
.Name("DropDownTree")
.Checkboxes(config =&gt; config
.TemplateHandler("checkboxTemplateHandler")
)
)

Id of the element that holds the client-side template to be used for rendering the items in the dropdowntree.

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

The ID of the template element for CheckBox Template

Returns:

DropDownTreeCheckboxesBuilder

Example:
C#
@( Html.Kendo().DropDownTree()
.Name("DropDownTree")
.Checkboxes(config =&gt; config
.TemplateId("widgetTemplateId")
)
)

Id of the element that holds the client-side template to be used for rendering the items in the dropdowntree.

C#
public DropDownTreeCheckboxesBuilder TemplateView(MvcHtmlString templateView)
Parameters:templateViewMvcHtmlString

The view that contains CheckBox Template

Returns:

DropDownTreeCheckboxesBuilder

Example:
C#
@( Html.Kendo().DropDownTree()
.Name("DropDownTree")
.Checkboxes(config =&gt; config
.TemplateView(Html.Partial("Template"))
)
)