Kendo UI DropDownTree TagHelper DropDownTreeTagHelper class.
Definition
Namespace:Kendo.Mvc.TagHelpers
Assembly:Kendo.Mvc.dll
Syntax:
[HtmlTargetElement("kendo-dropdowntree")]
[HtmlTargetElement("dropdowntree-editor", ParentTag = "form-item")]
[HtmlTargetElement("dropdowntree-editor", ParentTag = "property-grid-item")]
[RestrictChildren("items", new string[] { "popup-animation", "popup", "checkboxes", "messages", "hierarchical-datasource", "label", "load-on-demand", "check-all-template", "footer-template", "header-template", "no-data-template", "item-template", "value-template" })]
public class DropDownTreeTagHelper : TagHelperBase, ITagHelper, ITagHelperComponent, IDataBoundWidget<HierarchicalDataSourceTagHelper>, IKendoFormEditor, ITemplateComponent
Inheritance: objectTagHelperTagHelperBaseDropDownTreeTagHelper
Implements:
Inherited Members
Example:
@addTagHelper *, Kendo.Mvc
<kendo-dropdowntree datatextfield="Name" datavaluefield="id" name="dropdowntree" style="width: 100%">
<hierarchical-datasource>
<schema>
<hierarchical-model id="id"></hierarchical-model>
</schema>
<transport>
<read url="@Url.Action("Remote_DropDownTreeData", "Home")" />
</transport>
</hierarchical-datasource>
</kendo-dropdowntree>
Child Tags
Constructors
Initializes a new instance of the DropDownTreeTagHelper class.
public DropDownTreeTagHelper(IKendoHtmlGenerator generator)
Properties
Specifies the adaptive rendering of the component.
public AdaptiveMode? AdaptiveMode { get; set; }
Allows customization of the subtitle's text in the adaptive view of the component.
public string AdaptiveSubtitle { get; set; }
Allows customization of the title's text in the adaptive view of the component.
public string AdaptiveTitle { get; set; }
Controls whether to bind the widget to the data source on initialization.
public bool? AutoBind { get; set; }
Controls whether to close the popup when item is selected or checked.
public bool? AutoClose { get; set; }
If set to true, the widget automatically adjusts the width of the popup element and does not wrap up the item label.
public bool? AutoWidth { get; set; }
Binds a list of items to the DropDownTree.
[HtmlAttributeName("bind-to")]
public IEnumerable<DropDownTreeItemModel> BindTo { get; set; }
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.
public bool? CheckAll { get; set; }
The template used to render the checkAll label. By default, the widget displays only a span element with text "Check all".
public string CheckAllTemplate { get; set; }
The template used to render the checkAll label. By default, the widget displays only a span element with text "Check all". This option expects the name of a JavaScript function that will be called to return the template.
public string CheckAllTemplateHandler { get; set; }
The template used to render the checkAll label. By default, the widget displays only a span element with text "Check all". This option expects the ID of the script element that contains the template.
public string CheckAllTemplateId { get; set; }
The template used to render the checkAll label. By default, the widget displays only a span element with text "Check all". This option expects the IHtmlContent instance containing the created HTML.
public IHtmlContent CheckAllTemplateView { get; set; }
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.
[HtmlAttributeName("checkboxes")]
public bool? CheckboxesEnabled { get; set; }
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.
public bool? ClearButton { get; set; }
Sets the field of the data item that provides the image URL of the DropDownTree nodes.
[HtmlAttributeName("dataimageurlfield")]
public string DataImageUrlField { get; set; }
The Id of the data source.
[HtmlAttributeName("datasource-id")]
public string DataSourceId { get; set; }
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.
[HtmlAttributeName("dataspritecssclassfield")]
public string DataSpriteCssClassField { get; set; }
The field of the data item that provides the text content of the list items. The widget will filter the data source based on this field.
[HtmlAttributeName("datatextfield")]
public string DataTextField { get; set; }
Sets the field of the data item that provides the link URL of the nodes.
[HtmlAttributeName("dataurlfield")]
public string DataUrlField { get; set; }
The field of the data item that provides the value of the widget.
[HtmlAttributeName("datavaluefield")]
public string DataValueField { get; set; }
Specifies the delay in milliseconds after which the DropDownTree will start filtering dataSource.
public double? Delay { get; set; }
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.
public bool? Enable { get; set; }
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.
public bool? EnforceMinLength { get; set; }
Sets a value controlling how the color is applied.
public FillMode? FillMode { get; set; }
The filtering method used to determine the suggestions for the current value. Filtration is turned off by default.
public FilterType? Filter { get; set; }
When filtering is enabled, allows aria-label to be defined for the filter input element.
public string FilterLabel { get; set; }
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.
public string FooterTemplate { get; set; }
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. This option expects the name of a JavaScript function that will be called to return the template.
public string FooterTemplateHandler { get; set; }
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. This option expects the ID of the script element that contains the template.
public string FooterTemplateId { get; set; }
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. This option expects the IHtmlContent instance containing the created HTML.
public IHtmlContent FooterTemplateView { get; set; }
An expression to be evaluated against the current model.
public ModelExpression For { get; set; }
Specifies a static HTML content, which will be rendered as a header of the popup element.
public string HeaderTemplate { get; set; }
Specifies a static HTML content, which will be rendered as a header of the popup element. This option expects the name of a JavaScript function that will be called to return the template.
public string HeaderTemplateHandler { get; set; }
Specifies a static HTML content, which will be rendered as a header of the popup element. This option expects the ID of the script element that contains the template.
public string HeaderTemplateId { get; set; }
Specifies a static HTML content, which will be rendered as a header of the popup element. This option expects the IHtmlContent instance containing the created HTML.
public IHtmlContent HeaderTemplateView { get; set; }
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.
public string Height { get; set; }
If set to false case-sensitive search will be performed to find suggestions. The widget performs case-insensitive searching by default.
public bool? IgnoreCase { get; set; }
IsNested member.
[HtmlAttributeNotBound]
public bool IsNested { get; set; }
Implements:
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.
[HtmlAttributeName("label")]
public string LabelValue { get; set; }
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.
[HtmlAttributeName("load-on-demand")]
public bool? LoadOnDemandEnabled { get; set; }
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.
public double? MinLength { get; set; }
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.
public string NoDataTemplate { get; set; }
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. This option expects the name of a JavaScript function that will be called to return the template.
public string NoDataTemplateHandler { get; set; }
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. This option expects the ID of the script element that contains the template.
public string NoDataTemplateId { get; set; }
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. This option expects the IHtmlContent instance containing the created HTML.
public IHtmlContent NoDataTemplateView { get; set; }
The name of the JavaScript function that will handle the change event. Fired when the value of the widget is changed by the user.The event handler function context (available via the this keyword) will be set to the widget instance.
public string OnChange { get; set; }
The name of the JavaScript function that will handle the close event. Fired when the popup of the widget is closed.The event handler function context (available via the this keyword) will be set to the widget instance.
public string OnClose { get; set; }
The name of the JavaScript function that will handle the dataBound event. Fired when the widget or sub levels of its items are bound to data from the dataSource.The event handler function context (available via the this keyword) will be set to the widget instance.
public string OnDataBound { get; set; }
The name of the JavaScript function that will handle the filtering event. Fired when the widget is about to filter the data source.The event handler function context (available via the this keyword) will be set to the widget instance.
public string OnFiltering { get; set; }
The name of the JavaScript function that will handle the kendoKeydown event. Triggered when the user presses a keyboard key while the DropDownTree is focused.The event handler function context (available via the this keyword) will be set to the widget instance.
public string OnKendoKeydown { get; set; }
The name of the JavaScript function that will handle the open event. Fired when the popup of the widget is opened by the user.The event handler function context (available via the this keyword) will be set to the widget instance.
public string OnOpen { get; set; }
The name of the JavaScript function that will handle the select event. Triggered when a node is being selected by the user. Cancellable. When checkboxes are enabled, it is also triggered when a node is being deselected.
public string OnSelect { get; set; }
The hint displayed by the widget when it is empty. Not set by default.
public string Placeholder { get; set; }
Sets the size of the component.
public ComponentSize? Size { get; set; }
Represents available tag modes of DropDownTree.
public DropDownTreeTagMode? TagMode { get; set; }
Template for rendering each node. This option expects the name of a JavaScript function that will be called to return the template.
public string TemplateHandler { get; set; }
Template for rendering each node. This option expects the ID of the script element that contains the template.
public string TemplateId { get; set; }
Represents a collection of templates defined for the component.
[HtmlAttributeNotBound]
public IDictionary<string, string> Templates { get; }
Implements:
Template for rendering each node. This option expects the IHtmlContent instance containing the created HTML.
public IHtmlContent TemplateView { get; set; }
The text of the widget used when the autoBind is set to false.
public string Text { get; set; }
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.
public object Value { get; set; }
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.
public bool? ValuePrimitive { get; set; }
The template used to render the value and the or the selected tags.
public string ValueTemplate { get; set; }
The template used to render the value and the or the selected tags. This option expects the name of a JavaScript function that will be called to return the template.
public string ValueTemplateHandler { get; set; }
The template used to render the value and the or the selected tags. This option expects the ID of the script element that contains the template.
public string ValueTemplateId { get; set; }
The template used to render the value and the or the selected tags. This option expects the IHtmlContent instance containing the created HTML.
public IHtmlContent ValueTemplateView { get; set; }
Methods
Gets the initialization script.
protected override string GetInitializationScript()
The initialization script.
Overrides:
public override Task ProcessAsync(TagHelperContext context, TagHelperOutput output)
Overrides:
Serializes the defined settings.
public override IDictionary<string, object> Serialize()
Overrides:
SerializeEvents method.
protected override Dictionary<string, object> SerializeEvents()
Overrides:
SerializeSettings method.
protected override Dictionary<string, object> SerializeSettings()
Overrides:
TryAddAsEditor method.
public bool TryAddAsEditor(TagHelperContext context)
The result.
Implements:
Writes the HTML output.
protected override void WriteHtml(TagHelperOutput output)
The TagHelper output.
Overrides: