ComboBoxBuilder
Defines the fluent API for configuring the Kendo UI ComboBox
Definition
Namespace:Kendo.Mvc.UI.Fluent
Assembly:Kendo.Mvc.dll
Syntax:
public class ComboBoxBuilder : MvvmWidgetBuilderBase<ComboBox, ComboBoxBuilder>, IHtmlContent
Inheritance: objectHelperResultWidgetBuilderBase<ComboBox, ComboBoxBuilder>MvvmWidgetBuilderBase<ComboBox, ComboBoxBuilder>ComboBoxBuilder
Implements:
Inherited Members
Constructors
Initializes a new instance of the ComboBoxBuilder class.
Methods
Specifies the adaptive rendering of the component.
public ComboBoxBuilder AdaptiveMode(AdaptiveMode value)
The value for AdaptiveMode
Returns:Returns the current ComboBoxBuilder instance.
Allows customization of the subtitle's text in the adaptive view of the component.
public ComboBoxBuilder AdaptiveSubtitle(string value)
The value for AdaptiveSubtitle
Returns:Returns the current ComboBoxBuilder instance.
Allows customization of the title's text in the adaptive view of the component.
public ComboBoxBuilder AdaptiveTitle(string value)
The value for AdaptiveTitle
Returns:Returns the current ComboBoxBuilder instance.
Configures the animation effects of the widget.
public ComboBoxBuilder Animation(Action<PopupAnimationBuilder> animationAction)
The action which configures the animation effects.
Returns:Returns the current instance of ComboBoxBuilder for method chaining.
Use to enable or disable animation of the popup element.
public ComboBoxBuilder Animation(bool enable)
The boolean value.
Returns:Returns the current instance of ComboBoxBuilder for method chaining.
Controls whether to bind the widget to the data source on initialization.
public ComboBoxBuilder AutoBind(bool value)
The value for AutoBind
Returns:Returns the current ComboBoxBuilder instance.
If set to true, the widget automatically adjusts the width of the popup element and does not wrap up the item label.
public ComboBoxBuilder AutoWidth(bool value)
The value for AutoWidth
Returns:Returns the current ComboBoxBuilder instance.
Binds the ComboBox to an IEnumerable list.
public ComboBoxBuilder BindTo(IEnumerable data)
The data source.
Returns:Returns the current instance of ComboBoxBuilder for method chaining.
Binds the ComboBox to a list of SelectListItem.
public ComboBoxBuilder BindTo(IEnumerable<SelectListItem> dataSource)
The data source.
Returns:Returns the current instance of ComboBoxBuilder for method chaining.
Use it to set the Id of the parent ComboBox widget.Help topic showing how cascading functionality works
public ComboBoxBuilder CascadeFrom(string value)
The value for CascadeFrom
Returns:Returns the current ComboBoxBuilder instance.
Defines the field to be used to filter the data source. If not defined, it is set to a field with the same name as the parent's dataValueField option.Help topic showing how cascading functionality works
public ComboBoxBuilder CascadeFromField(string value)
The value for CascadeFromField
Returns:Returns the current ComboBoxBuilder instance.
Defines the parent field to be used to retain value from. This value will be used further to filter the dataSource. If not defined the value from the parent's dataValueField will be used.
public ComboBoxBuilder CascadeFromParentField(string value)
The value for CascadeFromParentField
Returns:Returns the current ComboBoxBuilder instance.
Applicable to a parent ComboBox in a cascading scenario. If set to true cascading will be triggered upon custom input in the parent widget. 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()
Returns the current ComboBoxBuilder instance.
Applicable to a parent ComboBox in a cascading scenario. If set to true cascading will be triggered upon custom input in the parent widget. 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)
The value for CascadeOnCustomValue
Returns:Returns the current ComboBoxBuilder instance.
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 ComboBoxBuilder ClearButton(bool value)
The value for ClearButton
Returns:Returns the current ComboBoxBuilder instance.
Sets the data source configuration of the ComboBox.
public ComboBoxBuilder DataSource(Action<ReadOnlyDataSourceBuilder> configurator)
The lambda which configures the data source
Returns:The id of the external data source that will be used by the ComboBox.
public ComboBoxBuilder DataSource(string dataSourceId)
The id of the external data source
Returns: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 ComboBoxBuilder DataTextField(string value)
The value for DataTextField
Returns:Returns the current ComboBoxBuilder instance.
The field of the data item that provides the value of the widget.
public ComboBoxBuilder DataValueField(string value)
The value for DataValueField
Returns:Returns the current ComboBoxBuilder instance.
The delay in milliseconds between a keystroke and when the widget displays the popup.
public ComboBoxBuilder Delay(double value)
The value for Delay
Returns:Returns the current ComboBoxBuilder instance.
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 ComboBoxBuilder Enable(bool value)
The value for Enable
Returns:Returns the current ComboBoxBuilder instance.
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.
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 ComboBoxBuilder EnforceMinLength(bool value)
The value for EnforceMinLength
Returns:Returns the current ComboBoxBuilder instance.
Configures the client-side events.
public ComboBoxBuilder Events(Action<ComboBoxEventBuilder> configurator)
The client events action.
Returns:Returns the current ComboBoxBuilder instance.
Sets a value controlling how the color is applied.
public ComboBoxBuilder FillMode(FillMode value)
The value for FillMode
Returns:Returns the current ComboBoxBuilder instance.
The filtering method used to determine the suggestions for the current value.
public ComboBoxBuilder Filter(FilterType value)
The value for Filter
Returns:Returns the current ComboBoxBuilder instance.
The template used to render the fixed header group. By default the widget displays only the value of the current group.
public ComboBoxBuilder FixedGroupTemplate(string value)
The value for FixedGroupTemplate
Returns:Returns the current ComboBoxBuilder instance.
The template used to render the fixed header group. By default the widget displays only the value of the current group.
public ComboBoxBuilder FixedGroupTemplate<TModel>(TemplateBuilder<TModel> template)
A Template component that configures the fixedgrouptemplate.
Returns:Returns the current ComboBoxBuilder instance.
The template used to render the fixed header group. By default the widget displays only the value of the current group.
public ComboBoxBuilder FixedGroupTemplateHandler(string templateHandler)
The handler that returs the template for FixedGroupTemplate
Returns:Returns the current ComboBoxBuilder instance.
The template used to render the fixed header group. By default the widget displays only the value of the current group.
public ComboBoxBuilder FixedGroupTemplateId(string templateId)
The ID of the template element for FixedGroupTemplate
Returns:Returns the current ComboBoxBuilder instance.
The template used to render the fixed header group. By default the widget displays only the value of the current group.
public ComboBoxBuilder FixedGroupTemplateView(IHtmlContent templateView)
The view that contains the template for FixedGroupTemplate
Returns:Returns the current ComboBoxBuilder instance.
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 ComboBoxBuilder FooterTemplate(string value)
The value for FooterTemplate
Returns:Returns the current ComboBoxBuilder instance.
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 ComboBoxBuilder FooterTemplate<TModel>(TemplateBuilder<TModel> template)
A Template component that configures the footertemplate.
Returns:Returns the current ComboBoxBuilder instance.
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 ComboBoxBuilder FooterTemplateHandler(string templateHandler)
The handler that returs the template for FooterTemplate
Returns:Returns the current ComboBoxBuilder instance.
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 ComboBoxBuilder FooterTemplateId(string templateId)
The ID of the template element for FooterTemplate
Returns:Returns the current ComboBoxBuilder instance.
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 ComboBoxBuilder FooterTemplateView(IHtmlContent templateView)
The view that contains the template for FooterTemplate
Returns:Returns the current ComboBoxBuilder instance.
The template used to render the groups. By default the widget displays only the value of the group.
public ComboBoxBuilder GroupTemplate(string value)
The value for GroupTemplate
Returns:Returns the current ComboBoxBuilder instance.
The template used to render the groups. By default the widget displays only the value of the group.
public ComboBoxBuilder GroupTemplate<TModel>(TemplateBuilder<TModel> template)
A Template component that configures the grouptemplate.
Returns:Returns the current ComboBoxBuilder instance.
The template used to render the groups. By default the widget displays only the value of the group.
public ComboBoxBuilder GroupTemplateHandler(string templateHandler)
The handler that returs the template for GroupTemplate
Returns:Returns the current ComboBoxBuilder instance.
The template used to render the groups. By default the widget displays only the value of the group.
public ComboBoxBuilder GroupTemplateId(string templateId)
The ID of the template element for GroupTemplate
Returns:Returns the current ComboBoxBuilder instance.
The template used to render the groups. By default the widget displays only the value of the group.
public ComboBoxBuilder GroupTemplateView(IHtmlContent templateView)
The view that contains the template for GroupTemplate
Returns:Returns the current ComboBoxBuilder instance.
Specifies a static HTML content, which will be rendered as a header of the popup element.
public ComboBoxBuilder HeaderTemplate(string value)
The value for HeaderTemplate
Returns:Returns the current ComboBoxBuilder instance.
Specifies a static HTML content, which will be rendered as a header of the popup element.
public ComboBoxBuilder HeaderTemplate<TModel>(TemplateBuilder<TModel> template)
A Template component that configures the headertemplate.
Returns:Returns the current ComboBoxBuilder instance.
Specifies a static HTML content, which will be rendered as a header of the popup element.
public ComboBoxBuilder HeaderTemplateHandler(string templateHandler)
The handler that returs the template for HeaderTemplate
Returns:Returns the current ComboBoxBuilder instance.
Specifies a static HTML content, which will be rendered as a header of the popup element.
public ComboBoxBuilder HeaderTemplateId(string templateId)
The ID of the template element for HeaderTemplate
Returns:Returns the current ComboBoxBuilder instance.
Specifies a static HTML content, which will be rendered as a header of the popup element.
public ComboBoxBuilder HeaderTemplateView(IHtmlContent templateView)
The view that contains the template for HeaderTemplate
Returns:Returns the current ComboBoxBuilder instance.
The height of the suggestion popup in pixels. The default value is 200 pixels.
public ComboBoxBuilder Height(double value)
The value for Height
Returns:Returns the current ComboBoxBuilder instance.
If set to true the first suggestion will be automatically highlighted.
public ComboBoxBuilder HighlightFirst(bool value)
The value for HighlightFirst
Returns:Returns the current ComboBoxBuilder instance.
If set to false case-sensitive search will be performed to find suggestions. The widget performs case-insensitive searching by default.
public ComboBoxBuilder IgnoreCase(bool value)
The value for IgnoreCase
Returns:Returns the current ComboBoxBuilder instance.
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 ComboBoxBuilder InputMode(string value)
The value for InputMode
Returns:Returns the current ComboBoxBuilder instance.
Defines the items in the ComboBox
public ComboBoxBuilder Items(Action<SelectListItemFactory> addAction)
The add action.
Returns:Returns the current instance of ComboBoxBuilder for method chaining.
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 ComboBoxBuilder Label(Action<ComboBoxLabelSettingsBuilder> configurator)
The ComboBoxLabelSettingsBuilder for the label setting.
Returns:Returns the current instance of ComboBoxBuilder .
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 ComboBoxBuilder Label(string label)
The label.
Returns:Returns the current instance of ComboBoxBuilder .
The text messages displayed in the widget. Use this option to customize or localize the messages.
public ComboBoxBuilder Messages(Action<ComboBoxMessagesSettingsBuilder> configurator)
The ComboBoxMessagesSettingsBuilder for the messages setting.
Returns:Returns the current instance of ComboBoxBuilder .
The minimum number of characters the user must type before a search is performed. Set to higher value than 1 if the search could match a lot of items.
public ComboBoxBuilder MinLength(double value)
The value for MinLength
Returns:Returns the current ComboBoxBuilder instance.
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 ComboBoxBuilder NoDataTemplate(string value)
The value for NoDataTemplate
Returns:Returns the current ComboBoxBuilder instance.
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 ComboBoxBuilder NoDataTemplate<TModel>(TemplateBuilder<TModel> template)
A Template component that configures the nodatatemplate.
Returns:Returns the current ComboBoxBuilder instance.
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 ComboBoxBuilder NoDataTemplateHandler(string templateHandler)
The handler that returs the template for NoDataTemplate
Returns:Returns the current ComboBoxBuilder instance.
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 ComboBoxBuilder NoDataTemplateId(string templateId)
The ID of the template element for NoDataTemplate
Returns:Returns the current ComboBoxBuilder instance.
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 ComboBoxBuilder NoDataTemplateView(IHtmlContent templateView)
The view that contains the template for NoDataTemplate
Returns:Returns the current ComboBoxBuilder instance.
The hint displayed by the widget when it is empty. Not set by default.
public ComboBoxBuilder Placeholder(string value)
The value for Placeholder
Returns:Returns the current ComboBoxBuilder instance.
The options that will be used for the popup initialization. For more details about the available options refer to Popup documentation.
public ComboBoxBuilder Popup(Action<ComboBoxPopupSettingsBuilder> configurator)
The ComboBoxPopupSettingsBuilder for the popup setting.
Returns:Returns the current instance of ComboBoxBuilder .
The configuration for the prefix adornment of the component.
public ComboBoxBuilder PrefixOptions(Action<ComboBoxPrefixOptionsSettingsBuilder> configurator)
The ComboBoxPrefixOptionsSettingsBuilder for the prefixoptions setting.
Returns:Returns the current instance of ComboBoxBuilder .
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 ComboBoxBuilder Readonly(bool value)
The value for Readonly
Returns:Returns the current ComboBoxBuilder instance.
Sets a value controlling the border radius.
public ComboBoxBuilder Rounded(Rounded value)
The value for Rounded
Returns:Returns the current ComboBoxBuilder instance.
Use it to set selected item index
public ComboBoxBuilder SelectedIndex(int value)
Item index.
Returns:Returns the current instance of ComboBoxBuilder for method chaining.
Sets the size of the component.
public ComboBoxBuilder Size(ComponentSize value)
The value for Size
Returns:Returns the current ComboBoxBuilder instance.
The configuration for the suffix adornment of the component.
public ComboBoxBuilder SuffixOptions(Action<ComboBoxSuffixOptionsSettingsBuilder> configurator)
The ComboBoxSuffixOptionsSettingsBuilder for the suffixoptions setting.
Returns:Returns the current instance of ComboBoxBuilder .
If set to true the widget will automatically use the first suggestion as its value.
If set to true the widget will automatically use the first suggestion as its value.
public ComboBoxBuilder Suggest(bool value)
The value for Suggest
Returns:Returns the current ComboBoxBuilder instance.
When set to true the widget will automatically set selected value to the typed custom text. Set the option to false to clear the selected value but keep the custom text.
public ComboBoxBuilder SyncValueAndText(bool value)
The value for SyncValueAndText
Returns:Returns the current ComboBoxBuilder instance.
The template used to render the items. By default the widget displays only the text of the data item (configured via dataTextField).
public ComboBoxBuilder Template(string value)
The value for Template
Returns:Returns the current ComboBoxBuilder instance.
The template used to render the items. By default the widget displays only the text of the data item (configured via dataTextField).
public ComboBoxBuilder Template<TModel>(TemplateBuilder<TModel> template)
A Template component that configures the template.
Returns:Returns the current ComboBoxBuilder instance.
The template used to render the items. By default the widget displays only the text of the data item (configured via dataTextField).
public ComboBoxBuilder TemplateHandler(string templateHandler)
The handler that returs the template for Template
Returns:Returns the current ComboBoxBuilder instance.
The template used to render the items. By default the widget displays only the text of the data item (configured via dataTextField).
public ComboBoxBuilder TemplateId(string templateId)
The ID of the template element for Template
Returns:Returns the current ComboBoxBuilder instance.
The template used to render the items. By default the widget displays only the text of the data item (configured via dataTextField).
public ComboBoxBuilder TemplateView(IHtmlContent templateView)
The view that contains the template for Template
Returns:Returns the current ComboBoxBuilder instance.
The text of the widget used when the autoBind is set to false.
public ComboBoxBuilder Text(string value)
The value for Text
Returns:Returns the current ComboBoxBuilder instance.
The value of the widget.
public ComboBoxBuilder Value(string value)
The value for Value
Returns:Returns the current ComboBoxBuilder instance.
Specifies the value binding behavior for the widget when the initial model value is null. 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.
Specifies the value binding behavior for the widget when the initial model value is null. 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 ComboBoxBuilder ValuePrimitive(bool value)
The value for ValuePrimitive
Returns:Returns the current ComboBoxBuilder instance.
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 ComboBoxBuilder Virtual()
Returns the current instance of ComboBoxVirtualSettingsBuilder .
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 ComboBoxBuilder Virtual(Action<ComboBoxVirtualSettingsBuilder> configurator)
The ComboBoxVirtualSettingsBuilder for the virtual setting.
Returns:Returns the current instance of ComboBoxBuilder .
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 ComboBoxBuilder Virtual(bool enabled)
Enables or disables the virtual option.
Returns:Returns the current instance of ComboBoxVirtualSettingsBuilder .