DropDownBase<T> Class

Base class of components that display a list of items.

Inheritance

Object

ComponentBase

RadzenComponent

DataBoundFormComponent<T>

DropDownBase<T>

Implements

IComponent

IHandleEvent

IHandleAfterRender

IRadzenFormComponent

Inherited Members

DataBoundFormComponent<T>.GetClassList

DataBoundFormComponent<T>.FocusAsync

DataBoundFormComponent<T>.OnContextMenu

DataBoundFormComponent<T>.TabIndex

DataBoundFormComponent<T>.FilterCaseSensitivity

DataBoundFormComponent<T>.FilterOperator

DataBoundFormComponent<T>.Name

DataBoundFormComponent<T>.Placeholder

DataBoundFormComponent<T>.Disabled

DataBoundFormComponent<T>.Change

DataBoundFormComponent<T>.LoadData

DataBoundFormComponent<T>.Form

DataBoundFormComponent<T>.Value

DataBoundFormComponent<T>.ValueChanged

DataBoundFormComponent<T>.IsBound

DataBoundFormComponent<T>.TextProperty

DataBoundFormComponent<T>.Query

DataBoundFormComponent<T>.SearchText

DataBoundFormComponent<T>.SearchTextChanged

DataBoundFormComponent<T>.EditContext

DataBoundFormComponent<T>.FieldIdentifier

DataBoundFormComponent<T>.ValueExpression

DataBoundFormComponent<T>.FormFieldContext

DataBoundFormComponent<T>.CurrentPlaceholder

DataBoundFormComponent<T>._view

RadzenComponent.OnMouseEnter

RadzenComponent.OnMouseLeave

RadzenComponent.GetCssClass

RadzenComponent.GetId

RadzenComponent.GetComponentCssClass

RadzenComponent.Debounce

RadzenComponent.RaiseContextMenu

RadzenComponent.RaiseMouseEnter

RadzenComponent.AddContextMenu

RadzenComponent.RaiseMouseLeave

RadzenComponent.OnBecameInvisible

RadzenComponent.Attributes

RadzenComponent.Element

RadzenComponent.MouseEnter

RadzenComponent.MouseLeave

RadzenComponent.ContextMenu

RadzenComponent.Culture

RadzenComponent.DefaultCulture

RadzenComponent.Style

RadzenComponent.Visible

RadzenComponent.UniqueID

RadzenComponent.JSRuntime

RadzenComponent.IsJSRuntimeAvailable

RadzenComponent.Reference

RadzenComponent.CurrentStyle

ComponentBase.BuildRenderTree

ComponentBase.OnInitializedAsync

ComponentBase.StateHasChanged

ComponentBase.ShouldRender

ComponentBase.OnAfterRender

ComponentBase.InvokeAsync

ComponentBase.DispatchExceptionAsync

ComponentBase.RendererInfo

ComponentBase.Assets

ComponentBase.AssignedRenderMode

Namespace: Radzen

Assembly: Radzen.Blazor.dll

Syntax

public class DropDownBase<T> : DataBoundFormComponent<T>, IComponent, IHandleEvent, IHandleAfterRender, IRadzenFormComponent

Type Parameters

Name Description
T

Constructors

DropDownBase<T>link

Base class of components that display a list of items.

Declaration
public DropDownBase<T>()

Fields

PreserveCollectionOnSelectionlink

Will add/remove selected items from a bound ICollection<T>, instead of replacing it.

Declaration
protected bool PreserveCollectionOnSelection

isPopupOpenlink

Gets a value indicating whether the popup is open.

Declaration
protected bool isPopupOpen

listlink

The list

Declaration
protected ElementReference? list

selectedIndexlink

The selected index

Declaration
protected int selectedIndex

selectedItemlink

The selected item

Declaration
protected object selectedItem

selectedItemslink

The selected items

Declaration
protected ISet<object> selectedItems

Properties

AllowClearlink

Gets or sets a value indicating whether the user can clear the value. Set to false by default.

Declaration
public bool AllowClear { get; set; }
Property Value
Type Description
boolGets or sets a value indicating whether the user can clear the value. Set to false by default.

AllowFilteringlink

Gets or sets a value indicating whether filtering is allowed. Set to false by default.

Declaration
public bool AllowFiltering { get; set; }
Property Value
Type Description
boolGets or sets a value indicating whether filtering is allowed. Set to false by default.

AllowSelectAlllink

Gets or sets a value indicating whether the user can select all values in multiple selection. Set to true by default.

Declaration
public bool AllowSelectAll { get; set; }
Property Value
Type Description
boolGets or sets a value indicating whether the user can select all values in multiple selection. Set to true by default.

AllowVirtualizationlink

Specifies wether virtualization is enabled. Set to false by default.

Declaration
public bool AllowVirtualization { get; set; }
Property Value
Type Description
boolSpecifies wether virtualization is enabled. Set to false by default.

ClearAriaLabellink

Gets or sets the clear button aria label text.

Declaration
public string ClearAriaLabel { get; set; }
Property Value
Type Description
stringGets or sets the clear button aria label text.

Countlink

Specifies the total number of items in the data source.

Declaration
public int Count { get; set; }
Property Value
Type Description
intSpecifies the total number of items in the data source.

Datalink

Gets or sets the data.

Declaration
public Collections.IEnumerable Data { get; set; }
Property Value
Type Description
Collections.IEnumerableGets or sets the data.

DisabledPropertylink

Gets or sets the disabled property.

Declaration
public string DisabledProperty { get; set; }
Property Value
Type Description
stringGets or sets the disabled property.

EmptyAriaLabellink

Gets or sets the empty value aria label text.

Declaration
public string EmptyAriaLabel { get; set; }
Property Value
Type Description
stringGets or sets the empty value aria label text.

FilterAsYouTypelink

Gets or sets a value indicating whether filtering is allowed as you type. Set to true by default.

Declaration
public bool FilterAsYouType { get; set; }
Property Value
Type Description
boolGets or sets a value indicating whether filtering is allowed as you type. Set to true by default.

FilterDelaylink

Gets or sets the filter delay.

Declaration
public int FilterDelay { get; set; }
Property Value
Type Description
intGets or sets the filter delay.

HasValuelink

Declaration
public bool HasValue { get; }
Property Value
Type Description
bool

HeaderTemplatelink

Gets or sets the header template.

Declaration
public RenderFragment HeaderTemplate { get; set; }
Property Value
Type Description
RenderFragmentGets or sets the header template.

ItemComparerlink

For lists of objects, an IEqualityComparer to control how selected items are determined

Declaration
public IEqualityComparer<object> ItemComparer { get; set; }
Property Value
Type Description
IEqualityComparer<object>For lists of objects, an IEqualityComparer to control how selected items are determined

Itemslink

Gets the items.

Declaration
protected IEnumerable<object> Items { get; }
Property Value
Type Description
IEnumerable<object>Gets the items.

ListIdlink

Gets the listbox identifier.

Declaration
protected string ListId { get; }
Property Value
Type Description
stringGets the listbox identifier.

Multiplelink

Gets or sets a value indicating whether this DropDownBase<T> is multiple.

Declaration
public bool Multiple { get; set; }
Property Value
Type Description
boolGets or sets a value indicating whether this DropDownBase<T> is multiple.

PageSizelink

Specifies the default page size. Set to 5 by default.

Declaration
public int PageSize { get; set; }
Property Value
Type Description
intSpecifies the default page size. Set to 5 by default.

PopupIDlink

Gets the popup identifier.

Declaration
protected string PopupID { get; }
Property Value
Type Description
stringGets the popup identifier.

RemoveChipTitlelink

Gets or sets the remove chip button title.

Declaration
public string RemoveChipTitle { get; set; }
Property Value
Type Description
stringGets or sets the remove chip button title.

ResetSelectedIndexOnFilterlink

Gets or sets a value indicating the selected index should reset to the top item when filtering, resulting in a down arrow action will start moving from the top.

Declaration
public bool ResetSelectedIndexOnFilter { get; set; }
Property Value
Type Description
boolGets or sets a value indicating the selected index should reset to the top item when filtering, resulting in a down arrow action will start moving from the top.

SearchAriaLabellink

Gets or sets the search aria label text.

Declaration
public string SearchAriaLabel { get; set; }
Property Value
Type Description
stringGets or sets the search aria label text.

SearchIDlink

Gets the search identifier.

Declaration
public string SearchID { get; }
Property Value
Type Description
stringGets the search identifier.

SelectedItemlink

Gets or sets the selected item.

Declaration
public object SelectedItem { get; set; }
Property Value
Type Description
objectGets or sets the selected item.

SelectedItemChangedlink

Gets or sets the selected item changed.

Declaration
public EventCallback<object> SelectedItemChanged { get; set; }
Property Value
Type Description
EventCallback<object>Gets or sets the selected item changed.

Separatorlink

Gets or sets the item separator for Multiple dropdown.

Declaration
public string Separator { get; set; }
Property Value
Type Description
stringGets or sets the item separator for Multiple dropdown.

Templatelink

Gets or sets the template.

Declaration
public RenderFragment<object> Template { get; set; }
Property Value
Type Description
RenderFragment<object>Gets or sets the template.

ValuePropertylink

Gets or sets the value property.

Declaration
public string ValueProperty { get; set; }
Property Value
Type Description
stringGets or sets the value property.

Viewlink

Gets the view.

Declaration
protected Collections.IEnumerable View { get; }
Property Value
Type Description
Collections.IEnumerableGets the view.

VirtualizationOverscanCountlink

Gets or sets a value that determines how many additional items will be rendered before and after the visible region. This help to reduce the frequency of rendering during scrolling. However, higher values mean that more elements will be present in the page.

Declaration
public int VirtualizationOverscanCount { get; set; }
Property Value
Type Description
intGets or sets a value that determines how many additional items will be rendered before and after the visible region. This help to reduce the frequency of rendering during scrolling. However, higher values mean that more elements will be present in the page.

Virtualizelink

The Virtualize instance.

Declaration
public Virtualization.Virtualize<object> Virtualize { get; }
Property Value
Type Description
Virtualization.Virtualize<object>The Virtualize instance.

Methods

ClearAlllink

Clears all.

Declaration
protected Task ClearAll()
Returns
Type Description
Task

Disposelink

Declaration
public override void Dispose()

GetItemOrValueFromPropertylink

Gets the item or value from property.

Declaration
public virtual object GetItemOrValueFromProperty(object item, string property)
Parameters
Type Name Description
object item The item.
string property The property.
Returns
Type Description
objectSystem.Object.

GetValuelink

Declaration
public override object GetValue()
Returns
Type Description
object

HandleKeyPresslink

Handles the key press.

Declaration
protected virtual Task HandleKeyPress(KeyboardEventArgs args, bool isFilter, bool? shouldSelectOnChange)
Parameters
Type Name Description
KeyboardEventArgs args The KeyboardEventArgs instance containing the event data.
bool isFilter if set to true [is filter].
bool? shouldSelectOnChange Should select item on item change with keyboard.
Returns
Type Description
Task

OnAfterRenderAsynclink

Called when [after render asynchronous].

Declaration
protected override Task OnAfterRenderAsync(bool firstRender)
Parameters
Type Name Description
bool firstRender if set to true [first render].
Returns
Type Description
TaskTask.

OnChangelink

Handles the Change event.

Declaration
protected void OnChange(ChangeEventArgs args)
Parameters
Type Name Description
ChangeEventArgs args The ChangeEventArgs instance containing the event data.

OnDataChangedlink

Declaration
protected override Task OnDataChanged()
Returns
Type Description
Task

OnFilterlink

Handles the FilterKeyPress event.

Declaration
protected virtual Task OnFilter(ChangeEventArgs args)
Parameters
Type Name Description
ChangeEventArgs args The KeyboardEventArgs instance containing the event data.
Returns
Type Description
Task

OnFilterInputlink

Handles filter input changes (e.g. paste).

Declaration
protected virtual Task OnFilterInput(ChangeEventArgs args)
Parameters
Type Name Description
ChangeEventArgs args The ChangeEventArgs instance containing the event data.
Returns
Type Description
Task

OnFilterKeyPresslink

Handles the FilterKeyPress event.

Declaration
protected virtual Task OnFilterKeyPress(KeyboardEventArgs args)
Parameters
Type Name Description
KeyboardEventArgs args The KeyboardEventArgs instance containing the event data.
Returns
Type Description
Task

OnInitializedlink

Declaration
protected override void OnInitialized()

OnKeyPresslink

Handles the KeyPress event.

Declaration
protected virtual Task OnKeyPress(KeyboardEventArgs args, bool? shouldSelectOnChange)
Parameters
Type Name Description
KeyboardEventArgs args The KeyboardEventArgs instance containing the event data.
bool? shouldSelectOnChange Should select item on item change with keyboard.
Returns
Type Description
Task

OnParametersSetlink

Declaration
protected override void OnParametersSet()

OnParametersSetAsynclink

Called when [parameters set asynchronous].

Declaration
protected override Task OnParametersSetAsync()
Returns
Type Description
TaskTask.

OnSelectAllKeyDownlink

Handles keyboard activation for the select-all action.

Declaration
protected Task OnSelectAllKeyDown(KeyboardEventArgs args)
Parameters
Type Name Description
KeyboardEventArgs args The KeyboardEventArgs instance containing the event data.
Returns
Type Description
Task

OnSelectItemlink

Called when [select item].

Declaration
protected virtual Task OnSelectItem(object item, bool isFromKey)
Parameters
Type Name Description
object item The item.
bool isFromKey if set to true [is from key].
Returns
Type Description
Task

OpenPopuplink

Opens the popup script.

Declaration
protected virtual Task OpenPopup(string key, bool isFilter, bool isFromClick)
Parameters
Type Name Description
string key
bool isFilter
bool isFromClick
Returns
Type Description
TaskSystem.String.

OpenPopupScriptlink

Opens the popup script.

Declaration
protected string OpenPopupScript()
Returns
Type Description
stringSystem.String.

OpenPopupScriptFromParentlink

Opens the popup script from parent.

Declaration
protected string OpenPopupScriptFromParent()
Returns
Type Description
stringSystem.String.

Resetlink

Resets this instance.

Declaration
public void Reset()

SelectAlllink

Selects all.

Declaration
protected virtual Task SelectAll()
Returns
Type Description
Task

SelectItemlink

Selects the item internal.

Declaration
public Task SelectItem(object item, bool raiseChange)
Parameters
Type Name Description
object item The item.
bool raiseChange if set to true [raise change].
Returns
Type Description
Task

SelectItemFromValuelink

Selects the item from value.

Declaration
protected virtual void SelectItemFromValue(object value)
Parameters
Type Name Description
object value The value.

SetParametersAsynclink

Set parameters as an asynchronous operation.

Declaration
public override Task SetParametersAsync(ParameterView parameters)
Parameters
Type Name Description
ParameterView parameters The parameters.
Returns
Type Description
TaskA Task representing the asynchronous operation.
An error has occurred. This app may no longer respond until reloaded. Reload 🗙