RadzenDropDown<TValue> Class

A dropdown select component that allows users to choose one or multiple items from a popup list. RadzenDropDown supports data binding, filtering, templates, virtual scrolling, and both single and multiple selection modes. Binds to a data source via the Data property and uses TextProperty and ValueProperty to determine what to display and what value to bind. Supports filtering (with configurable operators and case sensitivity), custom item templates, empty state templates, value templates for the selected item display, and can be configured as editable to allow custom text entry. For multiple selection, set Multiple=true and bind to a collection type.

Inheritance

Object

ComponentBase

RadzenComponent

DataBoundFormComponent<TValue>

DropDownBase<TValue>

RadzenDropDown<TValue>

Implements

IComponent

IHandleEvent

IHandleAfterRender

IRadzenFormComponent

Inherited Members

DropDownBase<TValue>.Reset

DropDownBase<TValue>.ClearAll

DropDownBase<TValue>.OnParametersSet

DropDownBase<TValue>.GetItemOrValueFromProperty

DropDownBase<TValue>.OnDataChanged

DropDownBase<TValue>.OpenPopupScript

DropDownBase<TValue>.OpenPopupScriptFromParent

DropDownBase<TValue>.OnFilterKeyPress

DropDownBase<TValue>.OnKeyPress

DropDownBase<TValue>.OnFilter

DropDownBase<TValue>.OnFilterInput

DropDownBase<TValue>.OnInitialized

DropDownBase<TValue>.OnParametersSetAsync

DropDownBase<TValue>.OnChange

DropDownBase<TValue>.SelectItem

DropDownBase<TValue>.OnSelectAllKeyDown

DropDownBase<TValue>.GetValue

DropDownBase<TValue>.SelectItemFromValue

DropDownBase<TValue>.VirtualizationOverscanCount

DropDownBase<TValue>.Virtualize

DropDownBase<TValue>.Count

DropDownBase<TValue>.AllowVirtualization

DropDownBase<TValue>.PageSize

DropDownBase<TValue>.HasValue

DropDownBase<TValue>.HeaderTemplate

DropDownBase<TValue>.AllowFiltering

DropDownBase<TValue>.FilterAsYouType

DropDownBase<TValue>.AllowClear

DropDownBase<TValue>.Multiple

DropDownBase<TValue>.ResetSelectedIndexOnFilter

DropDownBase<TValue>.AllowSelectAll

DropDownBase<TValue>.Template

DropDownBase<TValue>.ValueProperty

DropDownBase<TValue>.DisabledProperty

DropDownBase<TValue>.RemoveChipTitle

DropDownBase<TValue>.ClearAriaLabel

DropDownBase<TValue>.SearchAriaLabel

DropDownBase<TValue>.EmptyAriaLabel

DropDownBase<TValue>.SelectedItemChanged

DropDownBase<TValue>.Data

DropDownBase<TValue>.PopupID

DropDownBase<TValue>.ListId

DropDownBase<TValue>.SearchID

DropDownBase<TValue>.FilterDelay

DropDownBase<TValue>.SelectedItem

DropDownBase<TValue>.Separator

DropDownBase<TValue>.Items

DropDownBase<TValue>.View

DropDownBase<TValue>.ItemComparer

DropDownBase<TValue>.selectedItems

DropDownBase<TValue>.selectedItem

DropDownBase<TValue>.search

DropDownBase<TValue>.list

DropDownBase<TValue>.selectedIndex

DropDownBase<TValue>.isPopupOpen

DropDownBase<TValue>.PreserveCollectionOnSelection

DataBoundFormComponent<TValue>.GetClassList

DataBoundFormComponent<TValue>.FocusAsync

DataBoundFormComponent<TValue>.OnContextMenu

DataBoundFormComponent<TValue>.TabIndex

DataBoundFormComponent<TValue>.FilterCaseSensitivity

DataBoundFormComponent<TValue>.FilterOperator

DataBoundFormComponent<TValue>.Name

DataBoundFormComponent<TValue>.Placeholder

DataBoundFormComponent<TValue>.Disabled

DataBoundFormComponent<TValue>.Change

DataBoundFormComponent<TValue>.LoadData

DataBoundFormComponent<TValue>.Form

DataBoundFormComponent<TValue>.Value

DataBoundFormComponent<TValue>.ValueChanged

DataBoundFormComponent<TValue>.IsBound

DataBoundFormComponent<TValue>.TextProperty

DataBoundFormComponent<TValue>.Query

DataBoundFormComponent<TValue>.SearchText

DataBoundFormComponent<TValue>.SearchTextChanged

DataBoundFormComponent<TValue>.EditContext

DataBoundFormComponent<TValue>.FieldIdentifier

DataBoundFormComponent<TValue>.ValueExpression

DataBoundFormComponent<TValue>.FormFieldContext

DataBoundFormComponent<TValue>.CurrentPlaceholder

DataBoundFormComponent<TValue>._view

RadzenComponent.OnMouseEnter

RadzenComponent.OnMouseLeave

RadzenComponent.GetCssClass

RadzenComponent.GetId

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.OnInitializedAsync

ComponentBase.StateHasChanged

ComponentBase.ShouldRender

ComponentBase.OnAfterRender

ComponentBase.InvokeAsync

ComponentBase.DispatchExceptionAsync

ComponentBase.RendererInfo

ComponentBase.Assets

ComponentBase.AssignedRenderMode

Namespace: Radzen.Blazor

Assembly: Radzen.Blazor.dll

Syntax

public class RadzenDropDown<TValue> : DropDownBase<TValue>, IComponent, IHandleEvent, IHandleAfterRender, IRadzenFormComponent

Type Parameters

Name Description
TValueThe type of the selected value. Can be a primitive type, complex object, or collection for multiple selection.

Examples

Basic dropdown with data binding:

<RadzenDropDown @bind-Value=@customerID TValue="string" Data=@customers TextProperty="CompanyName" ValueProperty="CustomerID" />

Dropdown with filtering and placeholder:

<RadzenDropDown @bind-Value=@selectedId TValue="int" Data=@items TextProperty="Name" ValueProperty="Id" 
                 AllowFiltering="true" FilterCaseSensitivity="FilterCaseSensitivity.CaseInsensitive" Placeholder="Select an item..." />

Multiple selection dropdown:

<RadzenDropDown @bind-Value=@selectedIds TValue="IEnumerable<int>" Data=@items Multiple="true" Chips="true" />

Constructors

RadzenDropDown<TValue>link

A dropdown select component that allows users to choose one or multiple items from a popup list. RadzenDropDown supports data binding, filtering, templates, virtual scrolling, and both single and multiple selection modes. Binds to a data source via the Data property and uses TextProperty and ValueProperty to determine what to display and what value to bind. Supports filtering (with configurable operators and case sensitivity), custom item templates, empty state templates, value templates for the selected item display, and can be configured as editable to allow custom text entry. For multiple selection, set Multiple=true and bind to a collection type.

Declaration
public RadzenDropDown<TValue>()

Properties

Chipslink

Gets or sets whether selected items should be displayed as removable chips in the input area. When enabled in multiple selection mode, each selected item appears as a chip with an X button for quick removal. Requires Multiple to be set to true.

Declaration
public bool Chips { get; set; }
Property Value
Type Description
boolGets or sets whether selected items should be displayed as removable chips in the input area. When enabled in multiple selection mode, each selected item appears as a chip with an X button for quick removal. Requires Multiple to be set to true.

ClearSearchAfterSelectionlink

Gets or sets whether the filter search text should be cleared after an item is selected. When true, selecting an item will reset the filter, showing all items again on the next open.

Declaration
public bool ClearSearchAfterSelection { get; set; }
Property Value
Type Description
boolGets or sets whether the filter search text should be cleared after an item is selected. When true, selecting an item will reset the filter, showing all items again on the next open.

Closelink

Callback for when a dropdown is closed.

Declaration
public EventCallback Close { get; set; }
Property Value
Type Description
EventCallbackCallback for when a dropdown is closed.

EmptyTemplatelink

Gets or sets the template displayed when the dropdown data source is empty or no items match the filter. Use this to show a custom "No items found" or "Empty list" message.

Declaration
public RenderFragment EmptyTemplate { get; set; }
Property Value
Type Description
RenderFragmentGets or sets the template displayed when the dropdown data source is empty or no items match the filter. Use this to show a custom "No items found" or "Empty list" message.

FilterAutoCompleteTypelink

Gets or sets the HTML autocomplete attribute value for the filter search input. Controls whether the browser should provide autocomplete suggestions for the filter field.

Declaration
public AutoCompleteType FilterAutoCompleteType { get; set; }
Property Value
Type Description
AutoCompleteTypeGets or sets the HTML autocomplete attribute value for the filter search input. Controls whether the browser should provide autocomplete suggestions for the filter field.

FilterPlaceholderlink

Gets or sets the placeholder text displayed in the filter search box within the dropdown popup. This helps users understand they can filter the list by typing.

Declaration
public string FilterPlaceholder { get; set; }
Property Value
Type Description
stringGets or sets the placeholder text displayed in the filter search box within the dropdown popup. This helps users understand they can filter the list by typing.

FooterTemplatelink

Gets or sets the footer template.

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

InputAttributeslink

Gets or sets additional HTML attributes to be applied to the underlying input element. This allows passing custom attributes like data-* attributes, aria-* attributes, or other HTML attributes directly to the input.

Declaration
public IReadOnlyDictionary<string, object> InputAttributes { get; set; }
Property Value
Type Description
IReadOnlyDictionary<string, object>Gets or sets additional HTML attributes to be applied to the underlying input element. This allows passing custom attributes like data-* attributes, aria-* attributes, or other HTML attributes directly to the input.

ItemRenderlink

Gets or sets a callback invoked when rendering each dropdown item. Use this to customize item attributes, such as adding CSS classes or data attributes based on item properties.

Declaration
public Action<DropDownItemRenderEventArgs<TValue>> ItemRender { get; set; }
Property Value
Type Description
Action<DropDownItemRenderEventArgs<TValue>>Gets or sets a callback invoked when rendering each dropdown item. Use this to customize item attributes, such as adding CSS classes or data attributes based on item properties.

MaxSelectedLabelslink

Gets or sets the maximum number of selected item labels to display in the input before showing a count summary. When multiple selection is enabled and more items are selected than this value, the input will show "N items selected" instead of listing all labels. Only applicable when Multiple is true.

Declaration
public int MaxSelectedLabels { get; set; }
Property Value
Type Description
intGets or sets the maximum number of selected item labels to display in the input before showing a count summary. When multiple selection is enabled and more items are selected than this value, the input will show "N items selected" instead of listing all labels. Only applicable when Multiple is true.

Openlink

Callback for when a dropdown is opened.

Declaration
public EventCallback Open { get; set; }
Property Value
Type Description
EventCallbackCallback for when a dropdown is opened.

OpenOnFocuslink

Gets or sets whether the dropdown popup should automatically open when the input receives focus. Useful for improving user experience by reducing clicks needed to interact with the dropdown.

Declaration
public bool OpenOnFocus { get; set; }
Property Value
Type Description
boolGets or sets whether the dropdown popup should automatically open when the input receives focus. Useful for improving user experience by reducing clicks needed to interact with the dropdown.

OpenPopupKeylink

Gets or sets the keyboard key that triggers opening the popup when OpenOnFocus is enabled. Default is "Enter".

Declaration
public string OpenPopupKey { get; set; }
Property Value
Type Description
stringGets or sets the keyboard key that triggers opening the popup when OpenOnFocus is enabled. Default is "Enter".

PopupStylelink

Gets or sets the CSS style applied to the dropdown popup container. Use this to control the popup dimensions, especially max-height to limit scrollable area.

Declaration
public string PopupStyle { get; set; }
Property Value
Type Description
stringGets or sets the CSS style applied to the dropdown popup container. Use this to control the popup dimensions, especially max-height to limit scrollable area.

ReadOnlylink

Gets or sets whether the dropdown is read-only and cannot be changed by user interaction. When true, the dropdown displays the selected value but prevents changing the selection.

Declaration
public bool ReadOnly { get; set; }
Property Value
Type Description
boolGets or sets whether the dropdown is read-only and cannot be changed by user interaction. When true, the dropdown displays the selected value but prevents changing the selection.

SelectAllTextlink

Gets or sets the select all text.

Declaration
public string SelectAllText { get; set; }
Property Value
Type Description
stringGets or sets the select all text.

SelectedItemsTextlink

Gets or sets the selected items text.

Declaration
public string SelectedItemsText { get; set; }
Property Value
Type Description
stringGets or sets the selected items text.

ValueTemplatelink

Gets or sets the template used to render the currently selected value in the dropdown input. This allows custom formatting or layout for the displayed selection. The template receives the selected item as context.

Declaration
public RenderFragment<object> ValueTemplate { get; set; }
Property Value
Type Description
RenderFragment<object>Gets or sets the template used to render the currently selected value in the dropdown input. This allows custom formatting or layout for the displayed selection. The template receives the selected item as context.

Methods

BuildRenderTreelink

Declaration
protected override void BuildRenderTree(Rendering.RenderTreeBuilder __builder)
Parameters
Type Name Description
Rendering.RenderTreeBuilder __builder

Disposelink

Declaration
public override void Dispose()

GetComponentCssClasslink

Declaration
protected override string GetComponentCssClass()
Returns
Type Description
string

HandleKeyPresslink

Declaration
protected override Task HandleKeyPress(KeyboardEventArgs args, bool isFilter, bool? shouldSelectOnChange)
Parameters
Type Name Description
KeyboardEventArgs args
bool isFilter
bool? shouldSelectOnChange
Returns
Type Description
Task

OnAfterRenderAsynclink

Declaration
protected override Task OnAfterRenderAsync(bool firstRender)
Parameters
Type Name Description
bool firstRender
Returns
Type Description
Task

OnCloselink

Called when popup is closed.

Declaration
public Task OnClose()
Returns
Type Description
Task

OnSelectItemlink

Called when item is selected.

Declaration
protected override 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.

Declaration
protected override Task OpenPopup(string key, bool isFilter, bool isFromClick)
Parameters
Type Name Description
string key The key.
bool isFilter if set to true [is filter].
bool isFromClick if set to true [is from click].
Returns
Type Description
Task

SelectAlllink

Declaration
protected override Task SelectAll()
Returns
Type Description
Task

SetParametersAsynclink

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