skip navigation
  • Product Bundles

    DevCraft

    All Telerik .NET tools and Kendo UI JavaScript components in one package. Now enhanced with:

    • NEW: Design Kits for Figma
    • Online Training
    • Document Processing Library
    • Embedded Reporting for web and desktop
    Web
    Kendo UI UI for jQuery UI for Angular UI for React UI for Vue UI for Blazor UI for ASP.NET Core UI for ASP.NET MVC UI for ASP.NET AJAX UI for Silverlight UI for PHP UI for JSP
    Mobile
    UI for .NET MAUI UI for Xamarin
    Document Management
    Telerik Document Processing
    Desktop
    UI for .NET MAUI UI for WinUI UI for WinForms UI for WPF UI for UWP
    Reporting & Mocking
    Telerik Reporting Telerik Report Server Telerik JustMock
    Automated Testing
    Test Studio Test Studio Dev Edition
    CMS
    Sitefinity
    UI/UX Tools
    ThemeBuilder Design System Kit
    Debugging
    Fiddler Fiddler Everywhere Fiddler Classic Fiddler Jam FiddlerCap FiddlerCore
    Extended Reality
    UI for Unity XR
    Free Tools
    JustAssembly JustDecompile VB.NET to C# Converter Testing Framework
    View all products
  • Overview
  • Demos
  • Blazor Hybrid
    • What's New
    • Roadmap
    • Release History
  • Support and Learning

    • Support and Learning Hub
    • Blazor Tutorials and Learning
    • First Stepswith Blazor Web Assembly
    • First Steps with Blazor Server
    • First Steps with Blazor Hybrid
    • Submit a Ticket

    Docs & Resources

    • Docs
    • Demos
    • Modernization and Migration
    • Virtual Classroom
    • Forums
    • Videos
    • Blogs

    Productivity and Design Tools

    • REPL for Blazor
    • ThemeBuilder
    • Design System Documentation
    • Figma Kits
    • Visual Studio Extensions
    • Visual Studio Code Extensions
    • Embedded Reporting
  • Pricing
  • Search
  • Shopping cart
    • Account Overview
    • Your Licenses
    • Downloads
    • Support Center
    • Forum Profile
    • Payment Methods
    • Edit Profile
    • Log out
  • Login
  • Contact Us
  • Try now

Class TelerikListBox<TItem>

The class for the Telerik ListBox component.

Inheritance
System.Object
BaseComponent
DataBoundComponent<TItem>
TelerikListBox<TItem>
Inherited Members
DataBoundComponent<TItem>.Rebind()
DataBoundComponent<TItem>.Data
BaseComponent.ShouldRender()
BaseComponent.OnInitializedAsync()
BaseComponent.InitLocalizer()
BaseComponent.ThrowIfParameterIsNull(Object, String)
BaseComponent.HaveOptionsChanged(IDictionary<String, Object>, IDictionary<String, Object>)
BaseComponent.GetClassString(String[])
BaseComponent.InvokeAsync<T>(String, Object[])
BaseComponent.InvokeAsync<T>(String, CancellationToken, Object[])
BaseComponent.InvokeVoidAsync(String, Object[])
BaseComponent.InvokeComponentMethodAsync<T>(String, Object[])
BaseComponent.InvokeComponentMethodAsync<T>(String, CancellationToken, Object[])
BaseComponent.InvokeVoidComponentMethodAsync(String, Object[])
BaseComponent.InvokeDisposeAsync()
BaseComponent.StateHasChanged()
BaseComponent.RootComponent
BaseComponent.Class
Namespace: Telerik.Blazor.Components
Assembly: Telerik.Blazor.dll

Syntax

public class TelerikListBox<TItem> : DataBoundComponent<TItem>, IDisposable, IListBoxContainer
Type Parameters
TItem

Constructors

TelerikListBox()

Declaration
public TelerikListBox()

Properties

AriaLabel

Describe the aria-label attribute for the items list.

Declaration
public string AriaLabel { get; set; }
Property Value
System.String

AriaLabelledBy

Describe the aria-labelledby attribute for the items list.

Declaration
public string AriaLabelledBy { get; set; }
Property Value
System.String

ConnectedListBoxId

The id of the list box you want to connect this list box with. Its value should be the same as the Id value of the connected list box.

Declaration
public string ConnectedListBoxId { get; set; }
Property Value
System.String

Draggable

Specifies whether the list box items can be dragged and dropped. This applies to both items within the same list box, as well as across multiple list boxes. Default value is false.

Declaration
public bool Draggable { get; set; }
Property Value
System.Boolean

DropSources

Specifies the ids of the list box components that can drag and drop items to the current list box. The DropSources option describes a one-way relationship. If you want a two-way connection, set the DropSources option to both components.

Declaration
public List<string> DropSources { get; set; }
Property Value
System.Collections.Generic.List<System.String>

Enabled

Whether the list box is enabled. Default value is true.

Declaration
public bool Enabled { get; set; }
Property Value
System.Boolean

Height

Defines the component height as a CSS value.

Declaration
public string Height { get; set; }
Property Value
System.String

Id

The id of the list box. If you want to connect multiple list boxes, assign the same value to the ConnectedListBoxId of the corresponding list box.

Declaration
public string Id { get; set; }
Property Value
System.String

ItemTemplate

The item template of the list box items. Use to override the default rendering of individual items.

Declaration
public RenderFragment<TItem> ItemTemplate { get; set; }
Property Value
Microsoft.AspNetCore.Components.RenderFragment<TItem>

ListBoxToolBarSettings

The container for the list box tool bar. Add a ListBoxToolBar tag within this fragment.

Declaration
public RenderFragment ListBoxToolBarSettings { get; set; }
Property Value
Microsoft.AspNetCore.Components.RenderFragment

NoDataTemplate

Defines the content of the list box when there is no data.

Declaration
public RenderFragment NoDataTemplate { get; set; }
Property Value
Microsoft.AspNetCore.Components.RenderFragment

OnDrop

Fires when the user drops dragged items. All data manipulations should be made here. Requires Draggable set to true.

Declaration
public EventCallback<ListBoxDropEventArgs<TItem>> OnDrop { get; set; }
Property Value
Microsoft.AspNetCore.Components.EventCallback<ListBoxDropEventArgs<TItem>>

OnRemove

Fires when the user initiate deletion of items. The event fires only for the list box owning the tool bar.

Declaration
public EventCallback<ListBoxRemoveEventArgs<TItem>> OnRemove { get; set; }
Property Value
Microsoft.AspNetCore.Components.EventCallback<ListBoxRemoveEventArgs<TItem>>

OnReorder

Fires when the user initiate reorder of items. The event fires only for the list box owning the tool bar.

Declaration
public EventCallback<ListBoxReorderEventArgs<TItem>> OnReorder { get; set; }
Property Value
Microsoft.AspNetCore.Components.EventCallback<ListBoxReorderEventArgs<TItem>>

OnTransfer

Fires when the user initiates a transfer of items from one list box to another list box. The event fires only for the list box owning the tool bar.

Declaration
public EventCallback<ListBoxTransferEventArgs<TItem>> OnTransfer { get; set; }
Property Value
Microsoft.AspNetCore.Components.EventCallback<ListBoxTransferEventArgs<TItem>>

SelectedItems

Specifies the selected items. Used with two-way binding.

Declaration
public IEnumerable<TItem> SelectedItems { get; set; }
Property Value
System.Collections.Generic.IEnumerable<TItem>

SelectedItemsChanged

Specifies the callback that's called when the selected items change.

Declaration
public EventCallback<IEnumerable<TItem>> SelectedItemsChanged { get; set; }
Property Value
Microsoft.AspNetCore.Components.EventCallback<System.Collections.Generic.IEnumerable<TItem>>

SelectionMode

Defines scrolling mode of the list box. Possible values are Single(default) and Multiple.

Declaration
public ListBoxSelectionMode SelectionMode { get; set; }
Property Value
ListBoxSelectionMode

Size

Specifies the size of the list box. Possible values are Small(default), Medium(default), and Large.

Declaration
public string Size { get; set; }
Property Value
System.String

TextField

Defines the TextField of the Data. Default value: "Text".

Declaration
public string TextField { get; set; }
Property Value
System.String

ToolBarPosition

Defines the position of the ToolBar. Possible values are Right(default), Left, Top, and Bottom.

Declaration
public ListBoxToolBarPosition ToolBarPosition { get; set; }
Property Value
ListBoxToolBarPosition

Width

Defines the component width as a CSS value.

Declaration
public string Width { get; set; }
Property Value
System.String

Methods

BuildRenderTree(RenderTreeBuilder)

Declaration
protected override void BuildRenderTree(RenderTreeBuilder __builder)
Parameters
Microsoft.AspNetCore.Components.Rendering.RenderTreeBuilder __builder

Dispose()

Declaration
public override void Dispose()
Overrides
Telerik.Blazor.Components.Common.DataBoundComponent<TItem>.Dispose()

OnAfterRenderAsync(Boolean)

Declaration
protected override Task OnAfterRenderAsync(bool firstRender)
Parameters
System.Boolean firstRender

Returns
System.Threading.Tasks.Task

Overrides
BaseComponent.OnAfterRenderAsync(Boolean)

OnInitialized()

Declaration
protected override void OnInitialized()

OnParametersSetAsync()

Declaration
protected override Task OnParametersSetAsync()
Returns
System.Threading.Tasks.Task

Overrides
Telerik.Blazor.Components.Common.DataBoundComponent<TItem>.OnParametersSetAsync()

Refresh()

Re-renders the component.

Declaration
public void Refresh()

SetParametersAsync(ParameterView)

Declaration
public override Task SetParametersAsync(ParameterView parameters)
Parameters
Microsoft.AspNetCore.Components.ParameterView parameters

Returns
System.Threading.Tasks.Task

Overrides
Telerik.Blazor.Components.Common.DataBoundComponent<TItem>.SetParametersAsync(Microsoft.AspNetCore.Components.ParameterView)
Getting Started
  • Client-side Blazor
  • Server-side Blazor
  • Demos
Community
  • Forums
  • Blogs
  • Feedback Portal
Support Resources
  • Demos
  • Knowledge Base
  • Samples Repo
  • Localizations Repo
Sample Applications
  • Dashboard
  • PWA - Stocks
  • PWA - Blazing Coffee Roasters

Copyright © 2019 Progress Software Corporation and/or its subsidiaries or affiliates.
All Rights Reserved.

Progress, Telerik, and certain product names used herein are trademarks or registered trademarks of Progress Software Corporation and/or one of its subsidiaries or affiliates in the U.S. and/or other countries. See Trademarks for appropriate markings.