Class
TelerikListBox<TItem>

The class for the Telerik ListBox component.

Definition

Namespace:Telerik.Blazor.Components

Assembly:Telerik.Blazor.dll

Type Parameters:

TItem

Syntax:

cs-api-definition
public class TelerikListBox<TItem> : DataBoundComponent<TItem>, IComponent, IHandleEvent, IHandleAfterRender, IDisposable

Inheritance: objectComponentBaseBaseComponentDataBoundComponent<TItem>TelerikListBox<TItem>

Implements: IComponentIDisposableIHandleAfterRenderIHandleEvent

Inherited Members DataBoundComponent<TItem>.Rebind()DataBoundComponent<TItem>.DataBaseComponent.ShouldRender()BaseComponent.OnInitializedAsync()BaseComponent.InitLocalizer()BaseComponent.ThrowIfParameterIsNull(object, string)BaseComponent.HaveOptionsChanged(IDictionary<string, object>, IDictionary<string, object>)BaseComponent.GetClassString(params string[])BaseComponent.InvokeAsync<T>(string, params object[])BaseComponent.InvokeAsync<T>(string, CancellationToken, params object[])BaseComponent.InvokeVoidAsync(string, params object[])BaseComponent.InvokeComponentMethodAsync<T>(string, params object[])BaseComponent.InvokeComponentMethodAsync<T>(string, CancellationToken, params object[])BaseComponent.InvokeVoidComponentMethodAsync(string, params object[])BaseComponent.InvokeComponentVoidMethodAsync(string, object)BaseComponent.InvokeDisposeAsync()BaseComponent.StateHasChanged()BaseComponent.RootComponentBaseComponent.ClassComponentBase.OnParametersSet()ComponentBase.OnAfterRender(bool)ComponentBase.InvokeAsync(Action)ComponentBase.InvokeAsync(Func<Task>)

Constructors

TelerikListBox()

Declaration

cs-api-definition
public TelerikListBox()

Properties

AriaLabel

Describe the aria-label attribute for the items list.

Declaration

cs-api-definition
[Parameter]
public string AriaLabel { get; set; }

Property Value

string

AriaLabelledBy

Describe the aria-labelledby attribute for the items list.

Declaration

cs-api-definition
[Parameter]
public string AriaLabelledBy { get; set; }

Property Value

string

ConnectedListBoxId

The id of the list box you want to connect this list box with. Its value should be the same as the Id value of the connected list box.

Declaration

cs-api-definition
[Parameter]
public string ConnectedListBoxId { get; set; }

Property Value

string

Draggable

Specifies whether the list box items can be dragged and dropped. This applies to both items within the same list box, as well as across multiple list boxes. Default value is false.

Declaration

cs-api-definition
[Parameter]
public bool Draggable { get; set; }

Property Value

bool

DropSources

Specifies the ids of the list box components that can drag and drop items to the current list box. The DropSources option describes a one-way relationship. If you want a two-way connection, set the DropSources option to both components.

Declaration

cs-api-definition
[Parameter]
public List<string> DropSources { get; set; }

Property Value

List<string>

Enabled

Whether the list box is enabled. Default value is true.

Declaration

cs-api-definition
[Parameter]
public bool Enabled { get; set; }

Property Value

bool

Height

Defines the component height as a CSS value.

Declaration

cs-api-definition
[Parameter]
public string Height { get; set; }

Property Value

string

Id

The id of the list box. If you want to connect multiple list boxes, assign the same value to the ConnectedListBoxId of the corresponding list box.

Declaration

cs-api-definition
[Parameter]
public string Id { get; set; }

Property Value

string

ItemTemplate

The item template of the list box items. Use to override the default rendering of individual items.

Declaration

cs-api-definition
[Parameter]
public RenderFragment<TItem> ItemTemplate { get; set; }

Property Value

RenderFragment<TItem>

ListBoxToolBarSettings

The container for the list box tool bar. Add a ListBoxToolBar tag within this fragment.

Declaration

cs-api-definition
[Parameter]
public RenderFragment ListBoxToolBarSettings { get; set; }

Property Value

RenderFragment

NoDataTemplate

Defines the content of the list box when there is no data.

Declaration

cs-api-definition
[Parameter]
public RenderFragment NoDataTemplate { get; set; }

Property Value

RenderFragment

OnDrop

Fires when the user drops dragged items. All data manipulations should be made here. Requires Draggable set to true.

Declaration

cs-api-definition
[Parameter]
public EventCallback<ListBoxDropEventArgs<TItem>> OnDrop { get; set; }

Property Value

EventCallback<ListBoxDropEventArgs<TItem>>

OnRemove

Fires when the user initiate deletion of items. The event fires only for the list box owning the tool bar.

Declaration

cs-api-definition
[Parameter]
public EventCallback<ListBoxRemoveEventArgs<TItem>> OnRemove { get; set; }

Property Value

EventCallback<ListBoxRemoveEventArgs<TItem>>

OnReorder

Fires when the user initiate reorder of items. The event fires only for the list box owning the tool bar.

Declaration

cs-api-definition
[Parameter]
public EventCallback<ListBoxReorderEventArgs<TItem>> OnReorder { get; set; }

Property Value

EventCallback<ListBoxReorderEventArgs<TItem>>

OnTransfer

Fires when the user initiates a transfer of items from one list box to another list box. The event fires only for the list box owning the tool bar.

Declaration

cs-api-definition
[Parameter]
public EventCallback<ListBoxTransferEventArgs<TItem>> OnTransfer { get; set; }

Property Value

EventCallback<ListBoxTransferEventArgs<TItem>>

SelectedItems

Specifies the selected items. Used with two-way binding.

Declaration

cs-api-definition
[Parameter]
public IEnumerable<TItem> SelectedItems { get; set; }

Property Value

IEnumerable<TItem>

SelectedItemsChanged

Specifies the callback that's called when the selected items change.

Declaration

cs-api-definition
[Parameter]
public EventCallback<IEnumerable<TItem>> SelectedItemsChanged { get; set; }

Property Value

EventCallback<IEnumerable<TItem>>

SelectionMode

Defines scrolling mode of the list box. Possible values are Single(default) and Multiple.

Declaration

cs-api-definition
[Parameter]
public ListBoxSelectionMode SelectionMode { get; set; }

Property Value

ListBoxSelectionMode

Size

Specifies the size of the list box. Possible values are Small(default), Medium(default), and Large.

Declaration

cs-api-definition
[Parameter]
public string Size { get; set; }

Property Value

string

TextField

Defines the TextField of the Data. Default value: "Text".

Declaration

cs-api-definition
[Parameter]
public string TextField { get; set; }

Property Value

string

ToolBarPosition

Defines the position of the ToolBar. Possible values are Right(default), Left, Top, and Bottom.

Declaration

cs-api-definition
[Parameter]
public ListBoxToolBarPosition ToolBarPosition { get; set; }

Property Value

ListBoxToolBarPosition

Width

Defines the component width as a CSS value.

Declaration

cs-api-definition
[Parameter]
public string Width { get; set; }

Property Value

string

Methods

BuildRenderTree(RenderTreeBuilder)

Declaration

cs-api-definition
protected override void BuildRenderTree(RenderTreeBuilder __builder)

Parameters

__builder

RenderTreeBuilder

Overrides ComponentBase.BuildRenderTree(RenderTreeBuilder)

Dispose()

Declaration

cs-api-definition
public override void Dispose()

Overrides DataBoundComponent<TItem>.Dispose()

OnAfterRenderAsync(bool)

Declaration

cs-api-definition
protected override Task OnAfterRenderAsync(bool firstRender)

Parameters

firstRender

bool

Returns

Task

Overrides BaseComponent.OnAfterRenderAsync(bool)

OnInitialized()

Declaration

cs-api-definition
protected override void OnInitialized()

Overrides ComponentBase.OnInitialized()

OnParametersSetAsync()

Declaration

cs-api-definition
protected override Task OnParametersSetAsync()

Returns

Task

Overrides DataBoundComponent<TItem>.OnParametersSetAsync()

Refresh()

Re-renders the component.

Declaration

cs-api-definition
public void Refresh()

SetParametersAsync(ParameterView)

Declaration

cs-api-definition
public override Task SetParametersAsync(ParameterView parameters)

Parameters

parameters

ParameterView

Returns

Task

Overrides DataBoundComponent<TItem>.SetParametersAsync(ParameterView)