MultiSelectTagHelper
Kendo UI MultiSelect TagHelper MultiSelectTagHelper class.
Definition
Namespace:Kendo.Mvc.TagHelpers
Assembly:Kendo.Mvc.dll
Syntax:
[HtmlTargetElement("kendo-multiselect")]
[HtmlTargetElement("multiselect-editor", ParentTag = "form-item")]
[HtmlTargetElement("multiselect-editor", ParentTag = "property-grid-item")]
[RestrictChildren("popup-animation", new string[] { "popup", "virtual", "datasource", "messages", "label", "prefix-options", "suffix-options", "fixed-group-template", "footer-template", "header-template", "no-data-template", "group-template", "item-template", "tag-template" })]
[OutputElementHint("div")]
public class MultiSelectTagHelper : DropDownBaseTagHelper, ITagHelper, ITagHelperComponent, IDataBoundWidget<DataSourceTagHelper>, ITemplateComponent, IKendoFormEditor
Inheritance: objectTagHelperTagHelperBaseDropDownBaseTagHelperMultiSelectTagHelper
Implements:
Inherited Members
Example:
@addTagHelper *, Kendo.Mvc
<kendo-multiselect name="multiselect"
datatextfield="ProductName"
datavaluefield="ProductID">
<datasource type="DataSourceTagHelperType.Custom" server-filtering="false">
<transport>
<read url="@Url.Action("Products_Read", "Home")" />
</transport>
</datasource>
</kendo-multiselect>
Child Tags
Constructors
Initializes a new instance of the MultiSelectTagHelper class.
public MultiSelectTagHelper(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 widget suggestion list on item selection.
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; }
When set to true, renders a checkbox next to each item in the dropdown list. Works in conjunction with the selectAll option to provide a fully checkbox-driven multi-selection experience.
public bool? Checkboxes { get; set; }
Unless this options 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; }
The field of the data item used when searching for suggestions. This is the text that will be displayed in the list of matched results.
[HtmlAttributeName("datatextfield")]
public string DataTextField { get; set; }
The field of the data item used when searching for suggestions. This is the value that will be displayed in the list of matched results.
[HtmlAttributeName("datavaluefield")]
public string DataValueField { get; set; }
Specifies the delay in milliseconds after which the MultiSelect will start filtering dataSource.
public double? Delay { get; set; }
Configures MultiSelect to render a down arrow that opens and closes its popup.
public bool? DownArrow { 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.
public FilterType? Filter { get; set; }
The template used to render the fixed header group. By default the widget displays only the value of the current group.
public string FixedGroupTemplate { get; set; }
The template used to render the fixed header group. By default the widget displays only the value of the current group. This option expects the name of a JavaScript function that will be called to return the template.
public string FixedGroupTemplateHandler { get; set; }
The template used to render the fixed header group. By default the widget displays only the value of the current group. This option expects the ID of the script element that contains the template.
public string FixedGroupTemplateId { get; set; }
The template used to render the fixed header group. By default the widget displays only the value of the current group. This option expects the IHtmlContent instance containing the created HTML.
public IHtmlContent FixedGroupTemplateView { 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; }
The template used to render the groups. By default the widget displays only the value of the group.
public string GroupTemplate { get; set; }
The template used to render the groups. By default the widget displays only the value of the group. This option expects the name of a JavaScript function that will be called to return the template.
public string GroupTemplateHandler { get; set; }
The template used to render the groups. By default the widget displays only the value of the group. This option expects the ID of the script element that contains the template.
public string GroupTemplateId { get; set; }
The template used to render the groups. By default the widget displays only the value of the group. This option expects the IHtmlContent instance containing the created HTML.
public IHtmlContent GroupTemplateView { 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; }
The height of the suggestion popup in pixels. The default value is 200 pixels.
public double? Height { get; set; }
If set to true the first suggestion will be automatically highlighted.
public bool? HighlightFirst { 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; }
Specifies the inputmode attribute of the inner <input /> element. It is used to specify the type of on-screen keyboard that should be displayed when the user focuses the input.
public string InputMode { get; set; }
IsNested member.
[HtmlAttributeNotBound]
public bool IsNested { get; set; }
Implements:
The template used to render the items in the popup list.
public string ItemTemplate { get; set; }
The template used to render the items in the popup list. This option expects the name of a JavaScript function that will be called to return the template.
public string ItemTemplateHandler { get; set; }
The template used to render the items in the popup list. This option expects the ID of the script element that contains the template.
public string ItemTemplateId { get; set; }
The template used to render the items in the popup list. This option expects the IHtmlContent instance containing the created HTML.
public IHtmlContent ItemTemplateView { get; set; }
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; }
Defines the limit of the selected items. If set to null widget will not limit number of the selected items.
public double? MaxSelectedItems { 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. A zero value means that a request will be made as soon as the user focuses the widget.
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 is bound to data from its data source.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 deselect event. Fired when an item is deselected or tag is removed.
public string OnDeselect { 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 MultiSelect 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. Fired when an item from the popup is selected by the user.
public string OnSelect { get; set; }
The name of the JavaScript function that will handle the selectAllChange event. Fired when the user clicks the "Select all" header item or activates it via keyboard. The event is preventable — calling e.preventDefault() cancels the built-in select/deselect-all logic so the application can implement its own (for example, fetching and selecting all records from a remote data source).The event handler function context (available via the this keyword) will be set to the widget instance.
public string OnSelectAllChange { get; set; }
The hint displayed by the widget when it is empty. Not set by default.
public string Placeholder { get; set; }
If set to true, the widget will be readonly and will not allow user input. The widget is not readonly be default and allow user input.
public bool? Readonly { get; set; }
When set to true, renders a sticky "Select all" header at the top of the dropdown list. Clicking it selects all currently rendered items. When checkboxes is also enabled, the header shows a checkbox that reflects the aggregate selection state: unchecked (none selected), indeterminate (some selected), or checked (all selected).The built-in click behavior can be overridden by handling the preventable selectAllChange event.
public bool? SelectAll { get; set; }
Sets the size of the component.
public ComponentSize? Size { get; set; }
When set to a number, the tag list switches to a summarized display once the number of selected items reaches or exceeds that threshold. The first summarizeAfter items are rendered as individual tags, and the remaining items are collapsed into a single overflow chip showing the count (e.g. "+5 item(s) selected"). When set to null (the default), all selected items are always rendered as individual tags unless tagMode is set to "single".
public double? SummarizeAfter { get; set; }
The mode used to render the selected tags. The available modes are: - multiple - renders a tag for every selected value - single - renders only one tag that shows the number of the selected values
public string TagMode { get; set; }
The template used to render the tags.
public string TagTemplate { get; set; }
The template used to render the tags. This option expects the name of a JavaScript function that will be called to return the template.
public string TagTemplateHandler { get; set; }
The template used to render the tags. This option expects the ID of the script element that contains the template.
public string TagTemplateId { get; set; }
The template used to render the tags. This option expects the IHtmlContent instance containing the created HTML.
public IHtmlContent TagTemplateView { get; set; }
Sets the value of the widget.
public IEnumerable 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; }
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: