New to Telerik UI for ASP.NET CoreStart a free 30-day trial

ASP.NET Core DropDownList Overview

The Telerik UI DropDownList TagHelper and HtmlHelper for ASP.NET Core are server-side wrappers for the Kendo UI DropDownList widget.

The DropDownList displays a list of values and allows for a single selection from the list. The user input is restricted within the predefined options.

Initializing the DropDownList

The following example demonstrates how to define the DropDownList.

Razor
    @(Html.Kendo().DropDownList()
        .Name("dropdownlist")
        .DataTextField("ProductName")
        .DataValueField("ProductID")
        .DataSource(source => {
            source.Read(read =>
            {
                read.Action("Products_Read", "DropDownList");
            });
        })
    )

Starting with the 2024 Q3 release, the HtmlHelper version of the component supports declarative initialization.

Basic Configuration

The DropDownList configuration options are passed as attributes.

Razor
    @(Html.Kendo().DropDownList()
        .Name("products")
        .DataTextField("ProductName")
        .DataValueField("ProductID")
        .HtmlAttributes(new { style = "width:100%;" })
        .Filter(FilterType.Contains)
        .DataSource(source => source
            .Read(read => read.Action("GetProducts", "Home"))
        )
    )

Functionality and Features

  • Binding—The DropDownList supports multiple data binding approaches: server, model, custom, and ajax binding.
  • Grouping—You can bind the DropDownList to grouped data sources.
  • Virtualization—The virtualization feature of the DropDownList allows you to display large datasets.
  • Templates—To control how the items, selected value, or a pop-up header are rendered, you can use the available templates.
  • Accessibility—The DropDownList is accessible by screen readers and provides WAI-ARIA, Section 508, WCAG 2.2, and keyboard support.

To learn more about the appearance, anatomy, and accessibility of the DropDownList, visit the Progress Design System documentation—an information portal offering rich component usage guidelines, descriptions of the available style variables, and globalization support details.

Next Steps

See Also