DropDownListBuilder
Defines the fluent interface for configuring the DropDownList component.
Definition
Namespace:Kendo.Mvc.UI.Fluent
Assembly:Kendo.Mvc.dll
Syntax:
public class DropDownListBuilder : DropDownListBuilderBase<DropDownList, DropDownListBuilder>, IHtmlString
Inheritance: objectWidgetBuilderBase<DropDownList, DropDownListBuilder>ListBuilderBase<DropDownList, DropDownListBuilder>DropDownListBuilderBase<DropDownList, DropDownListBuilder>DropDownListBuilder
Implements:
Inherited Members
Constructors
Methods
Controls whether to bind the widget to the DataSource on initialization.
Controls whether to adjust the popup width
Binds the DropDownList to a list of DropDownListItem.
public DropDownListBuilder BindTo(IEnumerable<DropDownListItem> dataSource)
The data source.
Returns:Binds the DropDownList to a list of SelectListItem.
public DropDownListBuilder BindTo(IEnumerable<SelectListItem> dataSource)
The data source.
Returns:Use it to set the Id of the parent DropDownList.
Use it to set the field used to filter the data source.
public DropDownListBuilder CascadeFromField(string cascadeFromField)
Defines the parent field to be used to retain value from. This value will be used further to filter the dataSource.
public DropDownListBuilder CascadeFromParentField(string cascadeFromParentField)
Sets the field of the data item that provides the value content of the list items.
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 enforceMinLength)
Configures the client-side events.
public DropDownListBuilder Events(Action<DropDownListEventBuilder> clientEventsAction)
The client events action.
Returns:Sets a value controlling how the color is applied.
public DropDownListBuilder FillMode(FillMode value)
The value for FillMode
Returns:Use it to enable filtering of items.
Use it to enable filtering of items.
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:Defines the items in the DropDownList
public DropDownListBuilder Items(Action<DropDownListItemFactory> addAction)
The add action.
Returns:public DropDownListBuilder Messages(Action<DropDownListMessagesSettingsBuilder> configurator)
Specifies the minimum number of characters that should be typed before the widget queries the dataSource.
Define the object of the default empty item.
Define the text of the default empty item.
OptionLabelTemplate to be used to render the option label content.
public DropDownListBuilder OptionLabelTemplate(string optionLabelTemplate)
OptionLabelTemplateView to be used to render the option label content.
public DropDownListBuilder OptionLabelTemplate<TModel>(TemplateBuilder<TModel> template)
A Template component that configures the template.
Returns:public DropDownListBuilder OptionLabelTemplateHandler(string value)
OptionLabelTemplateId to be used to render the option label content.
public DropDownListBuilder OptionLabelTemplateId(string optionLabelTemplateId)
OptionLabelTemplateView to be used to render the option label content.
public DropDownListBuilder OptionLabelTemplateView(MvcHtmlString optionLabelTemplateView)
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:Sets a value controlling the border radius.
public DropDownListBuilder Rounded(Rounded? value)
The value for Rounded
Returns:Use it to set selected item index
Sets the size of the component.
public DropDownListBuilder Size(ComponentSize? value)
The value for Size
Returns:Define the default item of the widget when the autoBind option is set to false.
Define the text of the widget, when the autoBind is set to false.
ValueTemplate to be used to render the selected value.
public DropDownListBuilder ValueTemplate(string valueTemplate)
ValueTemplateView to be used to render the selected value.
public DropDownListBuilder ValueTemplate<TModel>(TemplateBuilder<TModel> template)
A Template component that configures the template.
Returns:The name of the JavaScript function that will return the template to be used to render the selected value.
ValueTemplateId to be used to render the selected value.
public DropDownListBuilder ValueTemplateId(string valueTemplateId)
ValueTemplateView to be used to render the selected value.
public DropDownListBuilder ValueTemplateView(MvcHtmlString valueTemplateView)