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.
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>.OnFilterInput
DropDownBase<TValue>.OnInitialized
DropDownBase<TValue>.OnParametersSetAsync
DropDownBase<TValue>.SelectItem
DropDownBase<TValue>.OnSelectAllKeyDown
DropDownBase<TValue>.SelectItemFromValue
DropDownBase<TValue>.VirtualizationOverscanCount
DropDownBase<TValue>.Virtualize
DropDownBase<TValue>.AllowVirtualization
DropDownBase<TValue>.HeaderTemplate
DropDownBase<TValue>.AllowFiltering
DropDownBase<TValue>.FilterAsYouType
DropDownBase<TValue>.AllowClear
DropDownBase<TValue>.ResetSelectedIndexOnFilter
DropDownBase<TValue>.AllowSelectAll
DropDownBase<TValue>.ValueProperty
DropDownBase<TValue>.DisabledProperty
DropDownBase<TValue>.RemoveChipTitle
DropDownBase<TValue>.ClearAriaLabel
DropDownBase<TValue>.SearchAriaLabel
DropDownBase<TValue>.EmptyAriaLabel
DropDownBase<TValue>.SelectedItemChanged
DropDownBase<TValue>.FilterDelay
DropDownBase<TValue>.SelectedItem
DropDownBase<TValue>.Separator
DropDownBase<TValue>.ItemComparer
DropDownBase<TValue>.selectedItems
DropDownBase<TValue>.selectedItem
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.RaiseContextMenu
RadzenComponent.RaiseMouseEnter
RadzenComponent.AddContextMenu
RadzenComponent.RaiseMouseLeave
RadzenComponent.OnBecameInvisible
RadzenComponent.DefaultCulture
RadzenComponent.IsJSRuntimeAvailable
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
public class RadzenListBox<TValue> : DropDownBase<TValue>, IComponent, IHandleEvent, IHandleAfterRender, IRadzenFormComponent| Name | Description |
|---|---|
| TValue | The type of the selected value. Can be a single value or IEnumerable for multiple selection. |
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;" />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.
public RadzenListBox<TValue>()Gets or sets the empty template shown when Data is empty.
public RenderFragment EmptyTemplate { get; set; }
| Type | Description |
|---|---|
| RenderFragment | Gets or sets the empty template shown when Data is empty. |
Gets or sets the empty text shown when Data is empty.
public string EmptyText { get; set; }
| Type | Description |
|---|---|
| string | Gets or sets the empty text shown when Data is empty. |
Specifies additional custom attributes that will be rendered by the input.
public IReadOnlyDictionary<string, object> InputAttributes { get; set; }
| Type | Description |
|---|---|
| IReadOnlyDictionary<string, object> | Specifies additional custom attributes that will be rendered by the input. |
Gets or sets the row render callback. Use it to set row attributes.
public Action<ListBoxItemRenderEventArgs<TValue>> ItemRender { get; set; }
| Type | Description |
|---|---|
| Action<ListBoxItemRenderEventArgs<TValue>> | Gets or sets the row render callback. Use it to set row attributes. |
Gets or sets a value indicating whether is read only.
public bool ReadOnly { get; set; }
| Type | Description |
|---|---|
| bool | Gets or sets a value indicating whether is read only. |
Gets or sets the select all text.
public string SelectAllText { get; set; }
| Type | Description |
|---|---|
| string | Gets or sets the select all text. |
protected override void BuildRenderTree(Rendering.RenderTreeBuilder __builder)
| Type | Name | Description |
|---|---|---|
| Rendering.RenderTreeBuilder | __builder |
protected override string GetComponentCssClass()
| Type | Description |
|---|---|
| string |
protected override Task OnAfterRenderAsync(bool firstRender)
| Type | Name | Description |
|---|---|---|
| bool | firstRender |
| Type | Description |
|---|---|
| Task |
Handles the key down event.
protected Task OnKeyDown(KeyboardEventArgs args)
| Type | Name | Description |
|---|---|---|
| KeyboardEventArgs | args | The KeyboardEventArgs instance containing the event data. |
| Type | Description |
|---|---|
| Task |
public override Task SetParametersAsync(ParameterView parameters)
| Type | Name | Description |
|---|---|---|
| ParameterView | parameters |
| Type | Description |
|---|---|
| Task |