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

Local Binding

The Telerik UI ListBox for ASP.NET MVC enables you to bind it to local data.

When you use complex data objects, use the DataTextField and DataValueField properties to notify the ListBox about your preferred binding behavior.

Razor
    @(Html.Kendo().ListBox()
        .Name("optional")
        .Toolbar(toolbar =>
        {
            toolbar.Position(ListBoxToolbarPosition.Right);
            toolbar.Tools(tools => tools
                .MoveUp()
                .MoveDown()
                .TransferTo()
                .TransferFrom()
                .TransferAllTo()
                .TransferAllFrom()
                .Remove()
            );
        })
        .ConnectWith("selected")
        .BindTo(ViewBag.Attendees) // Bind the ListBox to a collection
    )

    @(Html.Kendo().ListBox()
        .Name("selected")
        .BindTo(new List<SelectListItem>())
        .Selectable(ListBoxSelectable.Multiple)
    )

See Also

In this article
See Also
Not finding the help you need?
Contact Support