RadzenListBox<TValue> Class

A list box component that displays a scrollable list of items with single or multiple selection support. RadzenListBox provides an always-visible alternative to dropdowns, ideal for showing multiple options without requiring a popup. Displays all items in a scrollable container, making all options visible at once (unlike dropdowns which hide options in a popup). Supports single selection (default) or multiple selection via Multiple property, built-in search/filter with configurable operators and case sensitivity, binding to any IEnumerable data source with TextProperty and ValueProperty, custom item templates for rich list item content, efficient rendering of large lists via IQueryable support, optional "Select All" checkbox for multiple selection mode, and keyboard navigation (Arrow keys, Page Up/Down, Home/End) for accessibility. Use when you want to show all available options without requiring clicks to open a dropdown, or when multiple selection is needed and checkboxes would take too much space.

Inheritance

Object

ComponentBase

RadzenComponent

DataBoundFormComponent<TValue>

DropDownBase<TValue>

RadzenListBox<TValue>

Implements

IComponent

IHandleEvent

IHandleAfterRender

IRadzenFormComponent

Inherited Members

DropDownBase<TValue>.Reset

DropDownBase<TValue>.ClearAll

DropDownBase<TValue>.OnParametersSet

DropDownBase<TValue>.GetItemOrValueFromProperty

DropDownBase<TValue>.OnDataChanged

DropDownBase<TValue>.OpenPopupScript

DropDownBase<TValue>.OpenPopupScriptFromParent

DropDownBase<TValue>.OpenPopup

DropDownBase<TValue>.HandleKeyPress

DropDownBase<TValue>.OnFilterKeyPress

DropDownBase<TValue>.OnKeyPress

DropDownBase<TValue>.OnSelectItem

DropDownBase<TValue>.OnFilter

DropDownBase<TValue>.OnFilterInput

DropDownBase<TValue>.OnInitialized

DropDownBase<TValue>.OnParametersSetAsync

DropDownBase<TValue>.OnChange

DropDownBase<TValue>.SelectItem

DropDownBase<TValue>.OnSelectAllKeyDown

DropDownBase<TValue>.GetValue

DropDownBase<TValue>.SelectItemFromValue

DropDownBase<TValue>.Dispose

DropDownBase<TValue>.VirtualizationOverscanCount

DropDownBase<TValue>.Virtualize

DropDownBase<TValue>.Count

DropDownBase<TValue>.AllowVirtualization

DropDownBase<TValue>.PageSize

DropDownBase<TValue>.HasValue

DropDownBase<TValue>.HeaderTemplate

DropDownBase<TValue>.AllowFiltering

DropDownBase<TValue>.FilterAsYouType

DropDownBase<TValue>.AllowClear

DropDownBase<TValue>.Multiple

DropDownBase<TValue>.ResetSelectedIndexOnFilter

DropDownBase<TValue>.AllowSelectAll

DropDownBase<TValue>.Template

DropDownBase<TValue>.ValueProperty

DropDownBase<TValue>.DisabledProperty

DropDownBase<TValue>.RemoveChipTitle

DropDownBase<TValue>.ClearAriaLabel

DropDownBase<TValue>.SearchAriaLabel

DropDownBase<TValue>.EmptyAriaLabel

DropDownBase<TValue>.SelectedItemChanged

DropDownBase<TValue>.Data

DropDownBase<TValue>.PopupID

DropDownBase<TValue>.ListId

DropDownBase<TValue>.SearchID

DropDownBase<TValue>.FilterDelay

DropDownBase<TValue>.SelectedItem

DropDownBase<TValue>.Separator

DropDownBase<TValue>.Items

DropDownBase<TValue>.View

DropDownBase<TValue>.ItemComparer

DropDownBase<TValue>.selectedItems

DropDownBase<TValue>.selectedItem

DropDownBase<TValue>.search

DropDownBase<TValue>.list

DropDownBase<TValue>.selectedIndex

DropDownBase<TValue>.isPopupOpen

DropDownBase<TValue>.PreserveCollectionOnSelection

DataBoundFormComponent<TValue>.GetClassList

DataBoundFormComponent<TValue>.FocusAsync

DataBoundFormComponent<TValue>.OnContextMenu

DataBoundFormComponent<TValue>.TabIndex

DataBoundFormComponent<TValue>.FilterCaseSensitivity

DataBoundFormComponent<TValue>.FilterOperator

DataBoundFormComponent<TValue>.Name

DataBoundFormComponent<TValue>.Placeholder

DataBoundFormComponent<TValue>.Disabled

DataBoundFormComponent<TValue>.Change

DataBoundFormComponent<TValue>.LoadData

DataBoundFormComponent<TValue>.Form

DataBoundFormComponent<TValue>.Value

DataBoundFormComponent<TValue>.ValueChanged

DataBoundFormComponent<TValue>.IsBound

DataBoundFormComponent<TValue>.TextProperty

DataBoundFormComponent<TValue>.Query

DataBoundFormComponent<TValue>.SearchText

DataBoundFormComponent<TValue>.SearchTextChanged

DataBoundFormComponent<TValue>.EditContext

DataBoundFormComponent<TValue>.FieldIdentifier

DataBoundFormComponent<TValue>.ValueExpression

DataBoundFormComponent<TValue>.FormFieldContext

DataBoundFormComponent<TValue>.CurrentPlaceholder

DataBoundFormComponent<TValue>._view

RadzenComponent.OnMouseEnter

RadzenComponent.OnMouseLeave

RadzenComponent.GetCssClass

RadzenComponent.GetId

RadzenComponent.Debounce

RadzenComponent.RaiseContextMenu

RadzenComponent.RaiseMouseEnter

RadzenComponent.AddContextMenu

RadzenComponent.RaiseMouseLeave

RadzenComponent.OnBecameInvisible

RadzenComponent.Attributes

RadzenComponent.Element

RadzenComponent.MouseEnter

RadzenComponent.MouseLeave

RadzenComponent.ContextMenu

RadzenComponent.Culture

RadzenComponent.DefaultCulture

RadzenComponent.Style

RadzenComponent.Visible

RadzenComponent.UniqueID

RadzenComponent.JSRuntime

RadzenComponent.IsJSRuntimeAvailable

RadzenComponent.Reference

RadzenComponent.CurrentStyle

ComponentBase.OnInitializedAsync

ComponentBase.StateHasChanged

ComponentBase.ShouldRender

ComponentBase.OnAfterRender

ComponentBase.InvokeAsync

ComponentBase.DispatchExceptionAsync

ComponentBase.RendererInfo

ComponentBase.Assets

ComponentBase.AssignedRenderMode

Namespace: Radzen.Blazor

Assembly: Radzen.Blazor.dll

Syntax

public class RadzenListBox<TValue> : DropDownBase<TValue>, IComponent, IHandleEvent, IHandleAfterRender, IRadzenFormComponent

Type Parameters

Name Description
TValueThe type of the selected value. Can be a single value or IEnumerable for multiple selection.

Examples

Basic list box:

<RadzenListBox @bind-Value=@selectedId TValue="int" Data=@countries TextProperty="Name" ValueProperty="Id" Style="height: 300px;" />

Multiple selection with Select All:

<RadzenListBox @bind-Value=@selectedIds TValue="IEnumerable<int>" Multiple="true" SelectAllText="Select All"
                Data=@items TextProperty="Name" ValueProperty="Id" Style="height: 400px;" />

Constructors

RadzenListBox<TValue>link

A list box component that displays a scrollable list of items with single or multiple selection support. RadzenListBox provides an always-visible alternative to dropdowns, ideal for showing multiple options without requiring a popup. Displays all items in a scrollable container, making all options visible at once (unlike dropdowns which hide options in a popup). Supports single selection (default) or multiple selection via Multiple property, built-in search/filter with configurable operators and case sensitivity, binding to any IEnumerable data source with TextProperty and ValueProperty, custom item templates for rich list item content, efficient rendering of large lists via IQueryable support, optional "Select All" checkbox for multiple selection mode, and keyboard navigation (Arrow keys, Page Up/Down, Home/End) for accessibility. Use when you want to show all available options without requiring clicks to open a dropdown, or when multiple selection is needed and checkboxes would take too much space.

Declaration
public RadzenListBox<TValue>()

Properties

EmptyTemplatelink

Gets or sets the empty template shown when Data is empty.

Declaration
public RenderFragment EmptyTemplate { get; set; }
Property Value
Type Description
RenderFragmentGets or sets the empty template shown when Data is empty.

EmptyTextlink

Gets or sets the empty text shown when Data is empty.

Declaration
public string EmptyText { get; set; }
Property Value
Type Description
stringGets or sets the empty text shown when Data is empty.

InputAttributeslink

Specifies additional custom attributes that will be rendered by the input.

Declaration
public IReadOnlyDictionary<string, object> InputAttributes { get; set; }
Property Value
Type Description
IReadOnlyDictionary<string, object>Specifies additional custom attributes that will be rendered by the input.

ItemRenderlink

Gets or sets the row render callback. Use it to set row attributes.

Declaration
public Action<ListBoxItemRenderEventArgs<TValue>> ItemRender { get; set; }
Property Value
Type Description
Action<ListBoxItemRenderEventArgs<TValue>>Gets or sets the row render callback. Use it to set row attributes.

ReadOnlylink

Gets or sets a value indicating whether is read only.

Declaration
public bool ReadOnly { get; set; }
Property Value
Type Description
boolGets or sets a value indicating whether is read only.

SelectAllTextlink

Gets or sets the select all text.

Declaration
public string SelectAllText { get; set; }
Property Value
Type Description
stringGets or sets the select all text.

Methods

BuildRenderTreelink

Declaration
protected override void BuildRenderTree(Rendering.RenderTreeBuilder __builder)
Parameters
Type Name Description
Rendering.RenderTreeBuilder __builder

GetComponentCssClasslink

Declaration
protected override string GetComponentCssClass()
Returns
Type Description
string

OnAfterRenderAsynclink

Declaration
protected override Task OnAfterRenderAsync(bool firstRender)
Parameters
Type Name Description
bool firstRender
Returns
Type Description
Task

OnKeyDownlink

Handles the key down event.

Declaration
protected Task OnKeyDown(KeyboardEventArgs args)
Parameters
Type Name Description
KeyboardEventArgs args The KeyboardEventArgs instance containing the event data.
Returns
Type Description
Task

SelectAlllink

Declaration
protected override Task SelectAll()
Returns
Type Description
Task

SetParametersAsynclink

Declaration
public override Task SetParametersAsync(ParameterView parameters)
Parameters
Type Name Description
ParameterView parameters
Returns
Type Description
Task
An error has occurred. This app may no longer respond until reloaded. Reload 🗙