Table of Contents

Class RadzenListBox<TValue>

Namespace
Radzen.Blazor
Assembly
Radzen.Blazor.dll

RadzenListBox component.

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

Type Parameters

TValue

The type of the value.

Inheritance
DropDownBase<TValue>
RadzenListBox<TValue>
Implements
Inherited Members

Examples

<RadzenListBox @bind-Value=@customerID TValue="string" Data=@customers TextProperty="CompanyName" ValueProperty="CustomerID" Change=@(args => Console.WriteLine($"Selected CustomerID: {args}")) />

Constructors

RadzenListBox()

public RadzenListBox()

Properties

InputAttributes

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

[Parameter]
public IReadOnlyDictionary<string, object> InputAttributes { get; set; }

Property Value

IReadOnlyDictionary<string, object>

The attributes.

ItemRender

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

[Parameter]
public Action<ListBoxItemRenderEventArgs<TValue>> ItemRender { get; set; }

Property Value

Action<ListBoxItemRenderEventArgs<TValue>>

The row render callback.

ReadOnly

Gets or sets a value indicating whether is read only.

[Parameter]
public bool ReadOnly { get; set; }

Property Value

bool

true if is read only; otherwise, false.

SelectAllText

Gets or sets the select all text.

[Parameter]
public string SelectAllText { get; set; }

Property Value

string

The select all text.

Methods

BuildRenderTree(RenderTreeBuilder)

protected override void BuildRenderTree(RenderTreeBuilder __builder)

Parameters

__builder RenderTreeBuilder

GetComponentCssClass()

protected override string GetComponentCssClass()

Returns

string

OnAfterRenderAsync(bool)

protected override Task OnAfterRenderAsync(bool firstRender)

Parameters

firstRender bool

Returns

Task

OnKeyDown(KeyboardEventArgs)

Handles the KeyDown event.

protected Task OnKeyDown(KeyboardEventArgs args)

Parameters

args KeyboardEventArgs

The KeyboardEventArgs instance containing the event data.

Returns

Task

SelectAll()

protected override Task SelectAll()

Returns

Task

SetParametersAsync(ParameterView)

public override Task SetParametersAsync(ParameterView parameters)

Parameters

parameters ParameterView

Returns

Task