ComboBoxBuilder
Defines the fluent interface for configuring the ComboBox component.
Definition
Namespace:Kendo.Mvc.UI.Fluent
Assembly:Kendo.Mvc.dll
Syntax:
public class ComboBoxBuilder : DropDownListBuilderBase<ComboBox, ComboBoxBuilder>, IHtmlString
Inheritance: objectWidgetBuilderBase<ComboBox, ComboBoxBuilder>ListBuilderBase<ComboBox, ComboBoxBuilder>DropDownListBuilderBase<ComboBox, ComboBoxBuilder>ComboBoxBuilder
Implements:
Inherited Members
Constructors
Initializes a new instance of the ComboBoxBuilder class.
Methods
Controls whether to bind the component to the DataSource on initialization.
Controls whether to adjust the popup width
Binds the ComboBox to a list of DropDownListItem.
public ComboBoxBuilder BindTo(IEnumerable<DropDownListItem> dataSource)
The data source.
Returns:Binds the ComboBox to a list of SelectListItem.
public ComboBoxBuilder BindTo(IEnumerable<SelectListItem> dataSource)
The data source.
Returns:Specifies the Id of the parent ComboBox, from which the child will cascade.
public ComboBoxBuilder CascadeFrom(string cascadeFrom)
The Id of the parent ComboBox.
Returns:Sets the field used to filter the data source.
public ComboBoxBuilder CascadeFromField(string cascadeFromField)
The name of the field.
Returns:Defines the parent field to be used to retain value from. This value will be used further to filter the data source.
public ComboBoxBuilder CascadeFromParentField(string cascadeFromParentField)
The name of the field.
Returns:Applicable to a parent ComboBox in a cascading scenario. If set to true cascading will be triggered upon custom input in the parent component. When set to false (default) the child will not cascade and it will be disabled upon setting custom input in the parent ComboBox. Cascade on custom values works only when cascadeFromParentField is not set for the child combo, or it points to the dataValueField of the parent.
Applicable to a parent ComboBox in a cascading scenario. If set to true cascading will be triggered upon custom input in the parent component. When set to false (default) the child will not cascade and it will be disabled upon setting custom input in the parent ComboBox. Cascade on custom values works only when cascadeFromParentField is not set for the child combo, or it points to the dataValueField of the parent.
public ComboBoxBuilder CascadeOnCustomValue(bool value)
If true, enables cascading from a custom value.
Returns:Use to enable or disable clear button functionality.
Sets the field of the data item that provides the value content of the list items.
public ComboBoxBuilder DataValueField(string field)
The name of the field.
Returns:If set to true the component will not show all items when the text of the search input cleared. By default the component shows all items when the text of the search input is cleared. Works in conjunction with minLength.
public ComboBoxBuilder EnforceMinLength(bool enforceMinLength)
The boolean value.
Returns:Configures the client-side events.
public ComboBoxBuilder Events(Action<ComboBoxEventBuilder> clientEventsAction)
The client events action.
Returns:Sets a value controlling how the color is applied.
public ComboBoxBuilder FillMode(FillMode value)
The value for FillMode.
Returns:Enables the filtering of items.
public ComboBoxBuilder Filter(FilterType filter)
The type of filtering.
Returns:Enables the filtering of items.
public ComboBoxBuilder Filter(string filter)
The type of filtering.
Returns:Use it to enable or disable the highlighting of the first matched item.
public ComboBoxBuilder HighlightFirst(bool highlightFirst)
If true, enables the highlighting.
Returns:Defines the "inputmode" attribute of the inner <input /> element. The attribute specifies the type of on-screen keyboard displayed when the user focuses the input.
public ComboBoxBuilder InputMode(string value)
The value that configures the "inputmode" attribute.
Returns:Defines the items in the ComboBox
public ComboBoxBuilder Items(Action<DropDownListItemFactory> addAction)
The add action.
Returns:The text messages displayed in the component. Use it to customize or localize the messages.
public ComboBoxBuilder Messages(Action<MessagesSettingsBuilder> configurator)
The action that configures the messages.
Returns:Specifies the minimum number of characters that should be typed before the component queries the dataSource.
public ComboBoxBuilder MinLength(int length)
The number of characters.
Returns:A string that appears in the textbox when it has no value.
public ComboBoxBuilder Placeholder(string placeholder)
The text that will appear as placeholder.
Returns:The configuration for the prefix adornment of the widget.
public ComboBoxBuilder PrefixOptions(Action<PrefixOptionsSettingsBuilder> configurator)
The action that configures the prefix options.
Returns: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.
Sets a value controlling the border radius.
public ComboBoxBuilder Rounded(Rounded? value)
The value for Rounded.
Returns:Sets the index of the item that will be selected.
public ComboBoxBuilder SelectedIndex(int index)
The index of the item.
Returns:Sets the size of the component.
public ComboBoxBuilder Size(ComponentSize? value)
The value for Size.
Returns:The configuration for the suffix adornment of the widget.
public ComboBoxBuilder SuffixOptions(Action<SuffixOptionsSettingsBuilder> configurator)
The action that configures the suffix options.
Returns:Controls whether the ComboBox should automatically auto-type the rest of text.
public ComboBoxBuilder Suggest(bool suggest)
If true, enables auto-type.
Returns:Controls whether the ComboBox should automatically sync custom text with the selected value.
public ComboBoxBuilder SyncValueAndText(bool syncValueAndText)
Define the text of the component, when AutoBind is set to false.
public ComboBoxBuilder Text(string text)
The text to be shown in the input.
Returns: