DropDownListBuilder
Defines the fluent API for configuring the Kendo UI DropDownList
Definition
Namespace:Kendo.Mvc.UI.Fluent
Assembly:Kendo.Mvc.dll
Syntax:
public class DropDownListBuilder : MvvmWidgetBuilderBase<DropDownList, DropDownListBuilder>, IHtmlContent
Inheritance: objectHelperResultWidgetBuilderBase<DropDownList, DropDownListBuilder>MvvmWidgetBuilderBase<DropDownList, DropDownListBuilder>DropDownListBuilder
Implements:
Inherited Members
Constructors
Initializes a new instance of the DropDownListBuilder class.
Methods
Specifies the adaptive rendering of the component.
public DropDownListBuilder AdaptiveMode(AdaptiveMode value)
The value for AdaptiveMode
Returns:Returns the current DropDownListBuilder instance.
Allows customization of the subtitle's text in the adaptive view of the component.
public DropDownListBuilder AdaptiveSubtitle(string value)
The value for AdaptiveSubtitle
Returns:Returns the current DropDownListBuilder instance.
Allows customization of the title's text in the adaptive view of the component.
public DropDownListBuilder AdaptiveTitle(string value)
The value for AdaptiveTitle
Returns:Returns the current DropDownListBuilder instance.
Configures the animation effects of the widget.
public DropDownListBuilder Animation(Action<PopupAnimationBuilder> animationAction)
The action which configures the animation effects.
Returns:Returns the current instance of DropDownListBuilder to allow method chaining.
Use to enable or disable animation of the popup element.
public DropDownListBuilder Animation(bool enable)
The boolean value.
Returns:Returns the current instance of DropDownListBuilder to allow method chaining.
Controls whether to bind the widget to the data source on initialization.
public DropDownListBuilder AutoBind(bool value)
The value for AutoBind
Returns:Returns the current DropDownListBuilder instance.
If set to true, the widget automatically adjusts the width of the popup element and does not wrap up the item label.
public DropDownListBuilder AutoWidth(bool value)
The value for AutoWidth
Returns:Returns the current DropDownListBuilder instance.
Binds the DropDownList to an IEnumerable list.
public DropDownListBuilder BindTo(IEnumerable data)
The data source.
Returns:Returns the current instance of DropDownListBuilder to allow method chaining.
Binds the DropDownList to a list of SelectListItem.
public DropDownListBuilder BindTo(IEnumerable<SelectListItem> dataSource)
The data source.
Returns:Returns the current instance of DropDownListBuilder to allow method chaining.
Use it to set the Id of the parent DropDownList widget.Help topic showing how cascading functionality works
public DropDownListBuilder CascadeFrom(string value)
The value for CascadeFrom
Returns:Returns the current DropDownListBuilder instance.
Defines the field to be used to filter the data source. If not defined the parent's dataValueField option will be used.Help topic showing how cascading functionality works
public DropDownListBuilder CascadeFromField(string value)
The value for CascadeFromField
Returns:Returns the current DropDownListBuilder 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 DropDownListBuilder CascadeFromParentField(string value)
The value for CascadeFromParentField
Returns:Returns the current DropDownListBuilder instance.
Sets the data source configuration of the DropDownList.
public DropDownListBuilder DataSource(Action<ReadOnlyDataSourceBuilder> configurator)
The lambda which configures the data source
Returns:Returns the current instance of DropDownListBuilder to allow method chaining.
Sets a standalone DataSource Component as data source of the DropDownList.
public DropDownListBuilder DataSource(string dataSourceId)
The id of the external dataSource widget.
Returns:Returns the current instance of DropDownListBuilder to allow method chaining.
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 DropDownListBuilder DataTextField(string value)
The value for DataTextField
Returns:Returns the current DropDownListBuilder instance.
The field of the data item that provides the value of the widget.
public DropDownListBuilder DataValueField(string value)
The value for DataValueField
Returns:Returns the current DropDownListBuilder instance.
Specifies the delay in milliseconds before the search-text typed by the end user is sent for filtering.
public DropDownListBuilder Delay(double value)
The value for Delay
Returns:Returns the current DropDownListBuilder 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 DropDownListBuilder Enable(bool value)
The value for Enable
Returns:Returns the current DropDownListBuilder 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.
public DropDownListBuilder EnforceMinLength()
Returns the current DropDownListBuilder 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.
public DropDownListBuilder EnforceMinLength(bool value)
The value for EnforceMinLength
Returns:Returns the current DropDownListBuilder instance.
Configures the client-side events.
public DropDownListBuilder Events(Action<DropDownListEventBuilder> configurator)
The client events action.
Returns:Returns the current DropDownListBuilder instance.
Sets a value controlling how the color is applied.
public DropDownListBuilder FillMode(FillMode value)
The value for FillMode
Returns:Returns the current DropDownListBuilder instance.
The filtering method used to determine the suggestions for the current value. Filtration is turned off by default.
public DropDownListBuilder Filter(FilterType value)
The value for Filter
Returns:Returns the current DropDownListBuilder instance.
When filtering is enabled, allows custom title to be defined for the filter input element.
public DropDownListBuilder FilterTitle(string value)
The value for FilterTitle
Returns:Returns the current DropDownListBuilder instance.
The template used to render the fixed header group. By default the widget displays only the value of the current group.
public DropDownListBuilder FixedGroupTemplate(string value)
The value for FixedGroupTemplate
Returns:Returns the current DropDownListBuilder instance.
The template used to render the fixed header group. By default the widget displays only the value of the current group.
public DropDownListBuilder FixedGroupTemplate<TModel>(TemplateBuilder<TModel> template)
A Template component that configures the fixedgrouptemplate.
Returns:Returns the current DropDownListBuilder instance.
The template used to render the fixed header group. By default the widget displays only the value of the current group.
public DropDownListBuilder FixedGroupTemplateHandler(string templateHandler)
The handler that returs the template for FixedGroupTemplate
Returns:Returns the current DropDownListBuilder instance.
The template used to render the fixed header group. By default the widget displays only the value of the current group.
public DropDownListBuilder FixedGroupTemplateId(string templateId)
The ID of the template element for FixedGroupTemplate
Returns:Returns the current DropDownListBuilder instance.
The template used to render the fixed header group. By default the widget displays only the value of the current group.
public DropDownListBuilder FixedGroupTemplateView(IHtmlContent templateView)
The view that contains the template for FixedGroupTemplate
Returns:Returns the current DropDownListBuilder 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 DropDownListBuilder FooterTemplate(string value)
The value for FooterTemplate
Returns:Returns the current DropDownListBuilder 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 DropDownListBuilder FooterTemplate<TModel>(TemplateBuilder<TModel> template)
A Template component that configures the footertemplate.
Returns:Returns the current DropDownListBuilder 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 DropDownListBuilder FooterTemplateHandler(string templateHandler)
The handler that returs the template for FooterTemplate
Returns:Returns the current DropDownListBuilder 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 DropDownListBuilder FooterTemplateId(string templateId)
The ID of the template element for FooterTemplate
Returns:Returns the current DropDownListBuilder 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 DropDownListBuilder FooterTemplateView(IHtmlContent templateView)
The view that contains the template for FooterTemplate
Returns:Returns the current DropDownListBuilder instance.
The template used to render the groups. By default the widget displays only the value of the group.
public DropDownListBuilder GroupTemplate(string value)
The value for GroupTemplate
Returns:Returns the current DropDownListBuilder instance.
The template used to render the groups. By default the widget displays only the value of the group.
public DropDownListBuilder GroupTemplate<TModel>(TemplateBuilder<TModel> template)
A Template component that configures the grouptemplate.
Returns:Returns the current DropDownListBuilder instance.
The template used to render the groups. By default the widget displays only the value of the group.
public DropDownListBuilder GroupTemplateHandler(string templateHandler)
The handler that returs the template for GroupTemplate
Returns:Returns the current DropDownListBuilder instance.
The template used to render the groups. By default the widget displays only the value of the group.
public DropDownListBuilder GroupTemplateId(string templateId)
The ID of the template element for GroupTemplate
Returns:Returns the current DropDownListBuilder instance.
The template used to render the groups. By default the widget displays only the value of the group.
public DropDownListBuilder GroupTemplateView(IHtmlContent templateView)
The view that contains the template for GroupTemplate
Returns:Returns the current DropDownListBuilder instance.
Specifies a static HTML content, which will be rendered as a header of the popup element.
public DropDownListBuilder HeaderTemplate(string value)
The value for HeaderTemplate
Returns:Returns the current DropDownListBuilder instance.
Specifies a static HTML content, which will be rendered as a header of the popup element.
public DropDownListBuilder HeaderTemplate<TModel>(TemplateBuilder<TModel> template)
A Template component that configures the headertemplate.
Returns:Returns the current DropDownListBuilder instance.
Specifies a static HTML content, which will be rendered as a header of the popup element.
public DropDownListBuilder HeaderTemplateHandler(string templateHandler)
The handler that returs the template for HeaderTemplate
Returns:Returns the current DropDownListBuilder instance.
Specifies a static HTML content, which will be rendered as a header of the popup element.
public DropDownListBuilder HeaderTemplateId(string templateId)
The ID of the template element for HeaderTemplate
Returns:Returns the current DropDownListBuilder instance.
Specifies a static HTML content, which will be rendered as a header of the popup element.
public DropDownListBuilder HeaderTemplateView(IHtmlContent templateView)
The view that contains the template for HeaderTemplate
Returns:Returns the current DropDownListBuilder instance.
The height of the suggestion popup in pixels. The default value is 200 pixels.
public DropDownListBuilder Height(double value)
The value for Height
Returns:Returns the current DropDownListBuilder instance.
If set to false case-sensitive search will be performed to find suggestions. The widget performs case-insensitive searching by default.
public DropDownListBuilder IgnoreCase(bool value)
The value for IgnoreCase
Returns:Returns the current DropDownListBuilder instance.
Defines the items in the DropDownList
public DropDownListBuilder Items(Action<SelectListItemFactory> addAction)
The add action.
Returns:Returns the current instance of DropDownListBuilder to allow 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 DropDownListBuilder Label(Action<DropDownListLabelSettingsBuilder> configurator)
The DropDownListLabelSettingsBuilder for the label setting.
Returns:Returns the current instance of DropDownListBuilder .
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 DropDownListBuilder Label(string label)
The label.
Returns:Returns the current instance of DropDownListBuilder .
The text messages displayed in the widget. Use this option to customize or localize the messages.
public DropDownListBuilder Messages(Action<DropDownListMessagesSettingsBuilder> configurator)
The DropDownListMessagesSettingsBuilder for the messages setting.
Returns:Returns the current instance of DropDownListBuilder .
The minimum number of characters the user must type before a filter is performed. Set to higher value than 1 if the search could match a lot of items.
public DropDownListBuilder MinLength(double value)
The value for MinLength
Returns:Returns the current DropDownListBuilder 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 DropDownListBuilder NoDataTemplate(string value)
The value for NoDataTemplate
Returns:Returns the current DropDownListBuilder 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 DropDownListBuilder NoDataTemplate<TModel>(TemplateBuilder<TModel> template)
A Template component that configures the nodatatemplate.
Returns:Returns the current DropDownListBuilder 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 DropDownListBuilder NoDataTemplateHandler(string templateHandler)
The handler that returs the template for NoDataTemplate
Returns:Returns the current DropDownListBuilder 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 DropDownListBuilder NoDataTemplateId(string templateId)
The ID of the template element for NoDataTemplate
Returns:Returns the current DropDownListBuilder 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 DropDownListBuilder NoDataTemplateView(IHtmlContent templateView)
The view that contains the template for NoDataTemplate
Returns:Returns the current DropDownListBuilder instance.
Define the text of the default empty item. If the value is an object, then the widget will use it as a valid data item. Note that the optionLabel will not be available if the widget is empty.
public DropDownListBuilder OptionLabel(object value)
The value for OptionLabel
Returns:Returns the current DropDownListBuilder instance.
The template used to render the option label. Use optionLabelTemplate if you want to customize the markup of the optionLabel.
public DropDownListBuilder OptionLabelTemplate(string value)
The value for OptionLabelTemplate
Returns:Returns the current DropDownListBuilder instance.
The template used to render the option label. Use optionLabelTemplate if you want to customize the markup of the optionLabel.
public DropDownListBuilder OptionLabelTemplate<TModel>(TemplateBuilder<TModel> template)
A Template component that configures the optionlabeltemplate.
Returns:Returns the current DropDownListBuilder instance.
The template used to render the option label. Use optionLabelTemplate if you want to customize the markup of the optionLabel.
public DropDownListBuilder OptionLabelTemplateHandler(string templateHandler)
The handler that returs the template for OptionLabelTemplate
Returns:Returns the current DropDownListBuilder instance.
The template used to render the option label. Use optionLabelTemplate if you want to customize the markup of the optionLabel.
public DropDownListBuilder OptionLabelTemplateId(string templateId)
The ID of the template element for OptionLabelTemplate
Returns:Returns the current DropDownListBuilder instance.
The template used to render the option label. Use optionLabelTemplate if you want to customize the markup of the optionLabel.
public DropDownListBuilder OptionLabelTemplateView(IHtmlContent templateView)
The view that contains the template for OptionLabelTemplate
Returns:Returns the current DropDownListBuilder instance.
The options that will be used for the popup initialization. For more details about the available options refer to Popup documentation.
public DropDownListBuilder Popup(Action<DropDownListPopupSettingsBuilder> configurator)
The DropDownListPopupSettingsBuilder for the popup setting.
Returns:Returns the current instance of DropDownListBuilder .
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 DropDownListBuilder Readonly(bool value)
The value for Readonly
Returns:Returns the current DropDownListBuilder instance.
Sets a value controlling the border radius.
public DropDownListBuilder Rounded(Rounded value)
The value for Rounded
Returns:Returns the current DropDownListBuilder instance.
Use it to set selected item index
public DropDownListBuilder SelectedIndex(int value)
Item index.
Returns:Returns the current instance of DropDownListBuilder to allow method chaining.
Sets the size of the component.
public DropDownListBuilder Size(ComponentSize value)
The value for Size
Returns:Returns the current DropDownListBuilder instance.
The template used to render the items. By default the widget displays only the text of the data item (configured via dataTextField).
public DropDownListBuilder Template(string value)
The value for Template
Returns:Returns the current DropDownListBuilder instance.
The template used to render the items. By default the widget displays only the text of the data item (configured via dataTextField).
public DropDownListBuilder Template<TModel>(TemplateBuilder<TModel> template)
A Template component that configures the template.
Returns:Returns the current DropDownListBuilder instance.
The template used to render the items. By default the widget displays only the text of the data item (configured via dataTextField).
public DropDownListBuilder TemplateHandler(string templateHandler)
The handler that returs the template for Template
Returns:Returns the current DropDownListBuilder instance.
The template used to render the items. By default the widget displays only the text of the data item (configured via dataTextField).
public DropDownListBuilder TemplateId(string templateId)
The ID of the template element for Template
Returns:Returns the current DropDownListBuilder instance.
The template used to render the items. By default the widget displays only the text of the data item (configured via dataTextField).
public DropDownListBuilder TemplateView(IHtmlContent templateView)
The view that contains the template for Template
Returns:Returns the current DropDownListBuilder instance.
The text of the widget used when the autoBind is set to false.
public DropDownListBuilder Text(string value)
The value for Text
Returns:Returns the current DropDownListBuilder instance.
The value of the widget.
public DropDownListBuilder Value(string value)
The value for Value
Returns:Returns the current DropDownListBuilder 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 primitive value of the selected item's field (defined in the dataValueField option).if set to false, the View-Model field will be updated with the selected item - the entire non-primitive object.
public DropDownListBuilder ValuePrimitive()
Returns the current DropDownListBuilder 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 primitive value of the selected item's field (defined in the dataValueField option).if set to false, the View-Model field will be updated with the selected item - the entire non-primitive object.
public DropDownListBuilder ValuePrimitive(bool value)
The value for ValuePrimitive
Returns:Returns the current DropDownListBuilder instance.
The valueTemplate used to render the selected value. By default the widget displays only the text of the data item (configured via dataTextField).
public DropDownListBuilder ValueTemplate(string value)
The value for ValueTemplate
Returns:Returns the current DropDownListBuilder instance.
The valueTemplate used to render the selected value. By default the widget displays only the text of the data item (configured via dataTextField).
public DropDownListBuilder ValueTemplate<TModel>(TemplateBuilder<TModel> template)
A Template component that configures the valuetemplate.
Returns:Returns the current DropDownListBuilder instance.
The valueTemplate used to render the selected value. By default the widget displays only the text of the data item (configured via dataTextField).
public DropDownListBuilder ValueTemplateHandler(string templateHandler)
The handler that returs the template for ValueTemplate
Returns:Returns the current DropDownListBuilder instance.
The valueTemplate used to render the selected value. By default the widget displays only the text of the data item (configured via dataTextField).
public DropDownListBuilder ValueTemplateId(string templateId)
The ID of the template element for ValueTemplate
Returns:Returns the current DropDownListBuilder instance.
The valueTemplate used to render the selected value. By default the widget displays only the text of the data item (configured via dataTextField).
public DropDownListBuilder ValueTemplateView(IHtmlContent templateView)
The view that contains the template for ValueTemplate
Returns:Returns the current DropDownListBuilder 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 DropDownListBuilder Virtual()
Returns the current instance of DropDownListVirtualSettingsBuilder .
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 DropDownListBuilder Virtual(Action<DropDownListVirtualSettingsBuilder> configurator)
The DropDownListVirtualSettingsBuilder for the virtual setting.
Returns:Returns the current instance of DropDownListBuilder .
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 DropDownListBuilder Virtual(bool enabled)
Enables or disables the virtual option.
Returns:Returns the current instance of DropDownListVirtualSettingsBuilder .