Class RadzenListBox<TValue>
RadzenListBox component.
Inherited Members
Namespace: Radzen.Blazor
Assembly: Radzen.Blazor.dll
Syntax
public class RadzenListBox<TValue> : DropDownBase<TValue>, IComponent, IHandleEvent, IHandleAfterRender, IDisposable, IRadzenFormComponent
Type Parameters
Name | Description |
---|---|
TValue | The type of the value. |
Examples
<RadzenListBox @bind-Value=@customerID TValue="string" Data=@customers TextProperty="CompanyName" ValueProperty="CustomerID" Change=@(args => Console.WriteLine($"Selected CustomerID: {args}")) />
Constructors
RadzenListBox()
RadzenListBox component.
Declaration
public RadzenListBox()
Examples
<RadzenListBox @bind-Value=@customerID TValue="string" Data=@customers TextProperty="CompanyName" ValueProperty="CustomerID" Change=@(args => Console.WriteLine($"Selected CustomerID: {args}")) />
Properties
InputAttributes
Specifies additional custom attributes that will be rendered by the input.
Declaration
[Parameter]
public IReadOnlyDictionary<string, object> InputAttributes { get; set; }
Property Value
Type | Description |
---|---|
IReadOnlyDictionary<string, object> | The attributes. |
ItemRender
Gets or sets the row render callback. Use it to set row attributes.
Declaration
[Parameter]
public Action<ListBoxItemRenderEventArgs<TValue>> ItemRender { get; set; }
Property Value
Type | Description |
---|---|
Action<ListBoxItemRenderEventArgs<TValue>> | The row render callback. |
ReadOnly
Gets or sets a value indicating whether is read only.
Declaration
[Parameter]
public bool ReadOnly { get; set; }
Property Value
Type | Description |
---|---|
bool |
|
SelectAllText
Gets or sets the select all text.
Declaration
[Parameter]
public string SelectAllText { get; set; }
Property Value
Type | Description |
---|---|
string | The select all text. |
Methods
BuildRenderTree(RenderTreeBuilder)
RadzenListBox component.
Declaration
protected override void BuildRenderTree(RenderTreeBuilder __builder)
Parameters
Type | Name | Description |
---|---|---|
RenderTreeBuilder | __builder |
Overrides
GetComponentCssClass()
Gets the component CSS class.
Declaration
protected override string GetComponentCssClass()
Returns
Type | Description |
---|---|
string |
Overrides
OnAfterRenderAsync(bool)
Called when [after render asynchronous].
Declaration
protected override Task OnAfterRenderAsync(bool firstRender)
Parameters
Type | Name | Description |
---|---|---|
bool | firstRender | if set to |
Returns
Type | Description |
---|---|
Task | Task. |
Overrides
OnKeyDown(KeyboardEventArgs)
Handles the KeyDown event.
Declaration
protected Task OnKeyDown(KeyboardEventArgs args)
Parameters
Type | Name | Description |
---|---|---|
KeyboardEventArgs | args | The KeyboardEventArgs instance containing the event data. |
Returns
Type | Description |
---|---|
Task |
SelectAll()
Selects all.
Declaration
protected override Task SelectAll()
Returns
Type | Description |
---|---|
Task |
Overrides
SetParametersAsync(ParameterView)
Set parameters as an asynchronous operation.
Declaration
public override Task SetParametersAsync(ParameterView parameters)
Parameters
Type | Name | Description |
---|---|---|
ParameterView | parameters | The parameters. |
Returns
Type | Description |
---|---|
Task | A Task representing the asynchronous operation. |