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

ASP.NET MVC ComboBox Overview

The Telerik UI ComboBox HtmlHelper for ASP.NET MVC is a server-side wrapper for the Kendo UI ComboBox widget.

The ComboBox displays a list of values and allows for a single selection from the list.

Initializing the ComboBox

The following example demonstrates how to define the ComboBox.

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

Basic Configuration

The following example demonstrates the basic configuration of the ComboBox.

Razor
    @(Html.Kendo().ComboBox()
        .Name("combobox")
        .DataTextField("ProductName")
        .DataValueField("ProductID")
        .HtmlAttributes(new { style = "width:100%" })
        .Filter("contains")
        .MinLength(3)
        .Height(290)
        .HeaderTemplate(
            "<div class=\"dropdown-header k-widget k-header\">" +
                "<span>Products</span>" +
            "</div>")
        .FooterTemplate("Total <strong>#: instance.dataSource.total() #</strong> items found")
        .DataSource(source =>
        {
            source.Read(read =>
            {
                read.Action("Products_Read2", "DropDownList");
            })
            .ServerFiltering(false);
        })
        .Events(e => e
            .Change("onChange")
            .Select("onSelect")
            .Open("onOpen")
            .Close("onClose")
            .DataBound("onDataBound")
            .Filtering("onFiltering")
        )
    )

    <script type="text/javascript">
        $(function () {
            // The Name() of the ComboBox is used to get its client-side instance.
            var combobox = $("#combobox").data("kendoComboBox");
            console.log(combobox);
        });
    </script>

Functionality and Features

FeatureDescription
BindingYou can bind the ComboBox to local arrays of data and to remote data services.
AppearanceYou can customize the appearance of the ComboBox by configuring its size, fill mode, and border radius.
GroupingIn the ComboBox, you can display data items that are grouped by a specific model field.
VirtualizationThe built-in virtualization of the ComboBox allows you to display large datasets.
FilteringYou can display only a subset of the available data by using the server-side filtering of the ComboBox.
TemplatesTo take full control over the rendering of the ComboBox items, popup header, and popup footer, you can use the available templates.
CascadingYou can use a series of two or more cascaded ComboBoxes.
AccessibilityThe ComboBox 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 ComboBox, 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