Class
TelerikDropDownList<TItem, TValue>

The class for the DropDownList component.

Definition

Namespace:Telerik.Blazor.Components

Assembly:Telerik.Blazor.dll

Type Parameters:

TItem

Type of the model if you cannot provide a Value.

TValue

Type of the Value if you cannot provide a reference to it.

Syntax:

cs-api-definition
public class TelerikDropDownList<TItem, TValue> : TelerikSelectBase<TItem, TValue>, IComponent, IHandleEvent, IHandleAfterRender, IDisposable, IPopupContainer

Inheritance: objectComponentBaseBaseComponentDataBoundComponent<TItem>TelerikSelectBase<TItem, TValue>TelerikDropDownList<TItem, TValue>

Implements: IComponentIDisposableIHandleAfterRenderIHandleEventIPopupContainer

Inherited Members TelerikSelectBase<TItem, TValue>.OnParametersSetAsync()TelerikSelectBase<TItem, TValue>.OnInitializedAsync()TelerikSelectBase<TItem, TValue>.Dispose()TelerikSelectBase<TItem, TValue>.FocusAsync()TelerikSelectBase<TItem, TValue>.Open()TelerikSelectBase<TItem, TValue>.Close()TelerikSelectBase<TItem, TValue>.Refresh()TelerikSelectBase<TItem, TValue>.DebounceChangeValue(string)TelerikSelectBase<TItem, TValue>.CascadedEditContextTelerikSelectBase<TItem, TValue>.FloatingLabelTelerikSelectBase<TItem, TValue>.IdTelerikSelectBase<TItem, TValue>.ValueFieldTelerikSelectBase<TItem, TValue>.TextFieldTelerikSelectBase<TItem, TValue>.GroupFieldTelerikSelectBase<TItem, TValue>.HeaderTemplateTelerikSelectBase<TItem, TValue>.FooterTemplateTelerikSelectBase<TItem, TValue>.NoDataTemplateTelerikSelectBase<TItem, TValue>.WidthTelerikSelectBase<TItem, TValue>.FilterableTelerikSelectBase<TItem, TValue>.TitleTelerikSelectBase<TItem, TValue>.SubtitleTelerikSelectBase<TItem, TValue>.AriaLabelTelerikSelectBase<TItem, TValue>.AriaLabelledByTelerikSelectBase<TItem, TValue>.AriaDescribedByTelerikSelectBase<TItem, TValue>.ReadOnlyTelerikSelectBase<TItem, TValue>.ScrollModeTelerikSelectBase<TItem, TValue>.ItemHeightTelerikSelectBase<TItem, TValue>.PageSizeTelerikSelectBase<TItem, TValue>.EnabledTelerikSelectBase<TItem, TValue>.ValueExpressionTelerikSelectBase<TItem, TValue>.ValueChangedTelerikSelectBase<TItem, TValue>.ValueTelerikSelectBase<TItem, TValue>.TabIndexTelerikSelectBase<TItem, TValue>.AdaptiveModeTelerikSelectBase<TItem, TValue>.OnChangeTelerikSelectBase<TItem, TValue>.OnBlurTelerikSelectBase<TItem, TValue>.FillModeTelerikSelectBase<TItem, TValue>.RoundedTelerikSelectBase<TItem, TValue>.SizeTelerikSelectBase<TItem, TValue>.ProcessingDataDataBoundComponent<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.OnInitialized()ComponentBase.OnParametersSet()ComponentBase.OnAfterRender(bool)ComponentBase.InvokeAsync(Action)ComponentBase.InvokeAsync(Func<Task>)

Constructors

TelerikDropDownList()

Declaration

cs-api-definition
public TelerikDropDownList()

Properties

DefaultText

Creates a default item to be shown when no value is selected. The value is set to default(TValue).

Declaration

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

Property Value

string

DropDownListSettings

Defines a renderfragment that contains all settings for the autocomplete. DropDownListPopupSettings.

Declaration

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

Property Value

RenderFragment

FilterDebounceDelay

Time in ms between the last typed symbol and the firing of the internal filter oninput event. Default is 150ms.

Declaration

cs-api-definition
[Parameter]
public int FilterDebounceDelay { get; set; }

Property Value

int

FilterOperator

Defines the filter operator. Default value is StringFilterOperator.StartsWith.

Declaration

cs-api-definition
[Parameter]
public StringFilterOperator FilterOperator { get; set; }

Property Value

StringFilterOperator

FilterPlaceholder

The hint that is displayed in the filter input.

Declaration

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

Property Value

string

ItemTemplate

Defines the item template of the list items.

Declaration

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

Property Value

RenderFragment<TItem>

OnClose

Defines the OnClose Event which is fired before the suggestion list of the DropDownList is closed.

Declaration

cs-api-definition
[Parameter]
public EventCallback<DropDownListCloseEventArgs> OnClose { get; set; }

Property Value

EventCallback<DropDownListCloseEventArgs>

OnItemRender

Fires each time an item in dropdown renders. Use the event to add a custom CSS class to each dropdown item based on its value.

Declaration

cs-api-definition
[Parameter]
public Action<DropDownListItemRenderEventArgs<TItem>> OnItemRender { get; set; }

Property Value

Action<DropDownListItemRenderEventArgs<TItem>>

OnOpen

Defines the OnOpen Event which is fired before the suggestion list of the DropDownList is opened.

Declaration

cs-api-definition
[Parameter]
public EventCallback<DropDownListOpenEventArgs> OnOpen { get; set; }

Property Value

EventCallback<DropDownListOpenEventArgs>

OnRead

Fires when the data source is read. Use this to attach your own filtering logic. Once attached, you must implement all such data source operations here, the Component will no longer perform them for you.

Declaration

cs-api-definition
[Parameter]
public EventCallback<DropDownListReadEventArgs> OnRead { get; set; }

Property Value

EventCallback<DropDownListReadEventArgs>

SelectedDataItem

Declaration

cs-api-definition
protected ListDataItem SelectedDataItem { get; set; }

Property Value

ListDataItem

TextField

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

Declaration

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

Property Value

string

Overrides TelerikSelectBase<TItem, TValue>.TextField

ValueMapper

A callback function that returns an item that corresponds to the argument value. Used in virtual scrolling combined with OnRead to facilitate pre-selection of items that are not currently loaded.

Declaration

cs-api-definition
[Parameter]
public Func<TValue, Task<TItem>> ValueMapper { get; set; }

Property Value

Func<TValue, Task<TItem>>

ValueTemplate

Defines the value template of the DropDownList.

Declaration

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

Property Value

RenderFragment<TItem>

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 TelerikSelectBase<TItem, TValue>.Dispose()

OnAfterRenderAsync(bool)

Declaration

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

Parameters

firstRender

bool

Returns

Task

Overrides BaseComponent.OnAfterRenderAsync(bool)

OnParametersSetAsync()

Declaration

cs-api-definition
protected override Task OnParametersSetAsync()

Returns

Task

Overrides TelerikSelectBase<TItem, TValue>.OnParametersSetAsync()

SetParametersAsync(ParameterView)

Declaration

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

Parameters

parameters

ParameterView

Returns

Task

Overrides TelerikSelectBase<TItem, TValue>.SetParametersAsync(ParameterView)