TreeViewCheckboxesBuilder
Methods
Enabled(System.Boolean)
Enable/disable rendering of checkboxes in the treeview.
Parameters
enabled - System.Boolean
Whether checkboxes should be rendered.
Example
@( Html.Kendo().TreeView()
.Name("TreeView")
.Checkboxes(config => config
.Enabled(true)
)
)
CheckChildren(System.Boolean)
Enable/disable checking of child checkboxes in the treeview.
Parameters
checkChildren - System.Boolean
Whether checking of parent checkboxes should check child checkboxes.
Example
@( Html.Kendo().TreeView()
.Name("TreeView")
.Checkboxes(config => config
.CheckChildren(true)
)
)
Template(System.String)
Client-side template to be used for rendering the items in the treeview.
Parameters
template - System.String
Example
@( Html.Kendo().TreeView()
.Name("TreeView")
.Checkboxes(config => config
.Template("#= data #")
)
)
TemplateHandler(System.String)
Parameters
template - System.String
TemplateId(System.String)
Id of the element that holds the client-side template to be used for rendering the items in the treeview.
Parameters
templateId - System.String
Example
@( Html.Kendo().TreeView()
.Name("TreeView")
.Checkboxes(config => config
.TemplateId("widgetTemplateId")
)
)
TemplateView(System.Web.Mvc.MvcHtmlString)
The view which contains the element that holds the client-side template to be used for rendering the items in the treeview.
Parameters
template - System.Web.Mvc.MvcHtmlString
Example
@( Html.Kendo().TreeView()
.Name("TreeView")
.Checkboxes(config => config
.TemplateView(Html.Partial("widgetTemplate"))
)
)
Name(System.String)
The name attribute of the checkbox fields. This will correlate to the name of the action method parameter that the nodes are posted to.
Parameters
name - System.String
The string that will be used in the name attribute.
Example
@( Html.Kendo().TreeView()
.Name("TreeView")
.Checkboxes(config => config
.Name("checkedNodes")
)
)