MultiSelect
Kendo UI MultiSelect component
Definition
Namespace:Kendo.Mvc.UI
Assembly:Kendo.Mvc.dll
Syntax:
public class MultiSelect : WidgetBase, IHtmlAttributesContainer, IFormEditor
Inheritance: objectWidgetBaseMultiSelect
Implements:
Inherited Members
Constructors
Initializes a new instance of the MultiSelect class.
public MultiSelect(ViewContext viewContext, string fieldName = "")
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; }
Animation member.
public PopupAnimation Animation { get; }
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; }
Gets or sets the DataSource.
public DataSource DataSource { get; }
Gets or sets the DataSourceId.
public string DataSourceId { 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.
public string DataTextField { get; set; }
The field of the data item that provides the value of the widget.
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 handler that returns the template used for FixedGroupTemplate
public string FixedGroupTemplateHandler { get; set; }
The id of the script element used for FixedGroupTemplate
public string FixedGroupTemplateId { 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 handler that returns the template used for FooterTemplate
public string FooterTemplateHandler { get; set; }
The id of the script element used for FooterTemplate
public string FooterTemplateId { 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 handler that returns the template used for GroupTemplate
public string GroupTemplateHandler { get; set; }
The id of the script element used for GroupTemplate
public string GroupTemplateId { get; set; }
Specifies a static HTML content, which will be rendered as a header of the popup element.
public string HeaderTemplate { get; set; }
The handler that returns the template used for HeaderTemplate
public string HeaderTemplateHandler { get; set; }
The id of the script element used for HeaderTemplate
public string HeaderTemplateId { 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; }
The template used to render the items in the popup list.
public string ItemTemplate { get; set; }
The handler that returns the template used for ItemTemplate
public string ItemTemplateHandler { get; set; }
The id of the script element used for ItemTemplate
public string ItemTemplateId { 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.
public MultiSelectLabelSettings Label { get; }
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 text messages displayed in the widget. Use this option to customize or localize the messages.
public MultiSelectMessagesSettings Messages { get; }
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 handler that returns the template used for NoDataTemplate
public string NoDataTemplateHandler { get; set; }
The id of the script element used for NoDataTemplate
public string NoDataTemplateId { get; set; }
The hint displayed by the widget when it is empty. Not set by default.
public string Placeholder { get; set; }
The options that will be used for the popup initialization. For more details about the available options refer to Popup documentation.
public MultiSelectPopupSettings Popup { get; }
The configuration for the prefix adornment of the component.
public MultiSelectPrefixOptionsSettings PrefixOptions { get; }
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; }
The configuration for the suffix adornment of the component.
public MultiSelectSuffixOptionsSettings SuffixOptions { get; }
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; }
Represents available tag modes of MultiSelect.
public MultiSelectTagMode? TagMode { get; set; }
The template used to render the tags.
public string TagTemplate { get; set; }
The handler that returns the template used for TagTemplate
public string TagTemplateHandler { get; set; }
The id of the script element used for TagTemplate
public string TagTemplateId { get; set; }
Gets or sets the Value.
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; }
Enables the virtualization feature of the widget. The configuration can be set on an object, which contains two properties - itemHeight and valueMapper.For detailed information, refer to the article on virtualization.
public MultiSelectVirtualSettings Virtual { get; }
Methods
GetElement method.
Serializes the component settings to a dictionary.
public override IDictionary<string, object> Serialize()
A dictionary of settings.
Overrides:
Implements:
SerializeSettings method.
protected override Dictionary<string, object> SerializeSettings()
Overrides:
Writes the HTML content.
protected override void WriteHtml(TextWriter writer)
The text writer.
Overrides:
WriteInitializationScript method.
public override void WriteInitializationScript(TextWriter writer)
Overrides: