Class RadzenListBox<TValue>
RadzenListBox component.
Inherited Members
Namespace: Radzen.Blazor
Assembly: Radzen.Blazor.dll
Syntax
public class RadzenListBox<TValue> : DropDownBase<TValue>, 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}")) />
Properties
InputAttributes
Specifies additional custom attributes that will be rendered by the input.
Declaration
public IReadOnlyDictionary<string, object> InputAttributes { get; set; }
Property Value
Type | Description |
---|---|
IReadOnlyDictionary<System.String, System.Object> | The attributes. |
ItemRender
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>> | The row render callback. |
ReadOnly
Gets or sets a value indicating whether is read only.
Declaration
public bool ReadOnly { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
|
SelectAllText
Gets or sets the select all text.
Declaration
public string SelectAllText { get; set; }
Property Value
Type | Description |
---|---|
System.String | The select all text. |
Methods
GetComponentCssClass()
Gets the component CSS class.
Declaration
protected override string GetComponentCssClass()
Returns
Type | Description |
---|---|
System.String |
Overrides
OnAfterRenderAsync(Boolean)
Called when [after render asynchronous].
Declaration
protected override async Task OnAfterRenderAsync(bool firstRender)
Parameters
Type | Name | Description |
---|---|---|
System.Boolean | firstRender | if set to |
Returns
Type | Description |
---|---|
Task | Task. |
Overrides
OnKeyDown(Microsoft.AspNetCore.Components.Web.KeyboardEventArgs)
Handles the KeyDown event.
Declaration
protected async System.Threading.Tasks.Task OnKeyDown(Microsoft.AspNetCore.Components.Web.KeyboardEventArgs args)
Parameters
Type | Name | Description |
---|---|---|
Microsoft.AspNetCore.Components.Web.KeyboardEventArgs | args | The |
Returns
Type | Description |
---|---|
System.Threading.Tasks.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 async Task SetParametersAsync(ParameterView parameters)
Parameters
Type | Name | Description |
---|---|---|
ParameterView | parameters | The parameters. |
Returns
Type | Description |
---|---|
Task | A Task representing the asynchronous operation. |