New to Telerik UI for ASP.NET Core? Start a free 30-day trial

Kendo UI DropDownList component

Definition

Constructors

Initializes a new instance of the DropDownList class.

C#
public DropDownList(ViewContext viewContext)
Parameters:viewContextViewContext

Properties

Specifies the adaptive rendering of the component.

C#
public AdaptiveMode? AdaptiveMode { get; set; }

Allows customization of the subtitle's text in the adaptive view of the component.

C#
public string AdaptiveSubtitle { get; set; }

Allows customization of the title's text in the adaptive view of the component.

C#
public string AdaptiveTitle { get; set; }

Animation member.

C#
public PopupAnimation Animation { get; }

Controls whether to bind the widget to the data source on initialization.

C#
public bool? AutoBind { get; set; }

If set to true, the widget automatically adjusts the width of the popup element and does not wrap up the item label.

C#
public bool? AutoWidth { get; set; }

Use it to set the Id of the parent DropDownList widget.Help topic showing how cascading functionality works

C#
public string CascadeFrom { get; set; }

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

C#
public string CascadeFromField { get; set; }

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.

C#
public string CascadeFromParentField { get; set; }

Gets or sets the DataSource.

C#
public DataSource DataSource { get; }

Gets or sets the DataSourceId.

C#
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.

C#
public string DataTextField { get; set; }

The field of the data item that provides the value of the widget.

C#
public string DataValueField { get; set; }

Specifies the delay in milliseconds before the search-text typed by the end user is sent for filtering.

C#
public double? Delay { 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.

C#
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.

C#
public bool? EnforceMinLength { get; set; }

Sets a value controlling how the color is applied.

C#
public FillMode? FillMode { get; set; }

The filtering method used to determine the suggestions for the current value. Filtration is turned off by default.

C#
public FilterType? Filter { get; set; }

When filtering is enabled, allows custom title to be defined for the filter input element.

C#
public string FilterTitle { get; set; }

The template used to render the fixed header group. By default the widget displays only the value of the current group.

C#
public string FixedGroupTemplate { get; set; }

The handler that returns the template used for FixedGroupTemplate

C#
public string FixedGroupTemplateHandler { get; set; }

The id of the script element used for FixedGroupTemplate

C#
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.

C#
public string FooterTemplate { get; set; }

The handler that returns the template used for FooterTemplate

C#
public string FooterTemplateHandler { get; set; }

The id of the script element used for FooterTemplate

C#
public string FooterTemplateId { get; set; }

The template used to render the groups. By default the widget displays only the value of the group.

C#
public string GroupTemplate { get; set; }

The handler that returns the template used for GroupTemplate

C#
public string GroupTemplateHandler { get; set; }

The id of the script element used for GroupTemplate

C#
public string GroupTemplateId { get; set; }

Specifies a static HTML content, which will be rendered as a header of the popup element.

C#
public string HeaderTemplate { get; set; }

The handler that returns the template used for HeaderTemplate

C#
public string HeaderTemplateHandler { get; set; }

The id of the script element used for HeaderTemplate

C#
public string HeaderTemplateId { get; set; }

The height of the suggestion popup in pixels. The default value is 200 pixels.

C#
public double? Height { get; set; }

If set to false case-sensitive search will be performed to find suggestions. The widget performs case-insensitive searching by default.

C#
public bool? IgnoreCase { 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.

C#
public DropDownListLabelSettings Label { get; }

The text messages displayed in the widget. Use this option to customize or localize the messages.

C#
public DropDownListMessagesSettings Messages { get; }

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.

C#
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.

C#
public string NoDataTemplate { get; set; }

The handler that returns the template used for NoDataTemplate

C#
public string NoDataTemplateHandler { get; set; }

The id of the script element used for NoDataTemplate

C#
public string NoDataTemplateId { get; set; }

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.

C#
public object OptionLabel { get; set; }

The template used to render the option label. Use optionLabelTemplate if you want to customize the markup of the optionLabel.

C#
public string OptionLabelTemplate { get; set; }

The handler that returns the template used for OptionLabelTemplate

C#
public string OptionLabelTemplateHandler { get; set; }

The id of the script element used for OptionLabelTemplate

C#
public string OptionLabelTemplateId { get; set; }

The options that will be used for the popup initialization. For more details about the available options refer to Popup documentation.

C#
public DropDownListPopupSettings Popup { 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.

C#
public bool? Readonly { get; set; }

Sets a value controlling the border radius.

C#
public Rounded? Rounded { get; set; }

SelectedIndex member.

C#
public int? SelectedIndex { get; set; }

Sets the size of the component.

C#
public ComponentSize? Size { get; set; }

The template used to render the items. By default the widget displays only the text of the data item (configured via dataTextField).

C#
public string Template { get; set; }

The handler that returns the template used for Template

C#
public string TemplateHandler { get; set; }

The id of the script element used for Template

C#
public string TemplateId { get; set; }

The text of the widget used when the autoBind is set to false.

C#
public string Text { get; set; }

The value of the widget.

C#
public string Value { get; set; }

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.

C#
public bool? ValuePrimitive { get; set; }

The valueTemplate used to render the selected value. By default the widget displays only the text of the data item (configured via dataTextField).

C#
public string ValueTemplate { get; set; }

The handler that returns the template used for ValueTemplate

C#
public string ValueTemplateHandler { get; set; }

The id of the script element used for ValueTemplate

C#
public string ValueTemplateId { 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.

C#
public DropDownListVirtualSettings Virtual { get; }

Methods

GetElement method.

C#
protected override TagBuilder GetElement()
Returns:

TagBuilder

Overrides: WidgetBase.GetElement()

Serializes the component settings to a dictionary.

C#
public override IDictionary<string, object> Serialize()
Returns:

IDictionary<string, object>

A dictionary of settings.

Overrides: WidgetBase.Serialize()

Implements: IFormEditor.Serialize()

SerializeSettings method.

C#
protected override Dictionary<string, object> SerializeSettings()
Returns:

Dictionary<string, object>

Overrides: WidgetBase.SerializeSettings()

Writes the HTML content.

C#
protected override void WriteHtml(TextWriter writer)
Parameters:writerTextWriter

The text writer.

Overrides: WidgetBase.WriteHtml(TextWriter)

WriteInitializationScript method.

C#
public override void WriteInitializationScript(TextWriter writer)
Parameters:writerTextWriter

Overrides: WidgetBase.WriteInitializationScript(TextWriter)