ListBox Overview

Telerik UI for ASP.NET Core Ninja image

The ListBox is part of Telerik UI for ASP.NET Core, a professional grade UI library with 110+ components for building modern and feature-rich applications. To try it out sign up for a free 30-day trial.

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

The ListBox provides suggestions depending on the typed text and allows multiple value entries. It displays a list of data that is contained in a box and allows single or multiple selection, reordering of selected items, and deleting items and features keyboard navigation as well as the dragging and dropping of items. You can also connect the ListBox with another list-box and customize the widget with the use of templates, toolbar positioning, placeholder and hint, and localization of its command buttons messages.

Initializing the ListBox

The following example demonstrates how to define the ListBox.

        .Toolbar(toolbar =>
            toolbar.Tools(tools => tools

            var tools = new string[] { "moveUp", "moveDown"};
        <kendo-listbox name="optional" 
            <toolbar position="ListBoxToolbarPosition.Right"
                     tools="tools" />

    public ActionResult Index()
        ViewBag.Attendees = new List<string>
            "Steven White",
            "Nancy King",
            "Nancy Davolio",
            "Robert Davolio",
            "Michael Leverling",
            "Andrew Callahan",
            "Michael Suyama"
        return View();

Functionality and Features


For a complete example on basic ListBox events, refer to the demo on using the events of the ListBox.

Referencing Existing Instances

To reference an existing ListBox instance, use the configuration option. Once a reference is established, use the ListBox client-side API to control its behavior.

The following example demonstrates how to access an existing ListBox instance.

  // Place the following after your ListBox for ASP.NET Core declaration.
  $(function() {
  // The Name() of the ListBox is used to get its client-side instance.
      var listbox = $("#listbox").getKendoListBox();

See Also

In this article