Demos About Radzen
Search Results for

    Show / Hide Table of Contents

    Class DropDownBase<T>

    Base class of components that display a list of items.

    Inheritance
    object
    ComponentBase
    RadzenComponent
    DataBoundFormComponent<T>
    DropDownBase<T>
    RadzenDropDownDataGrid<TValue>
    RadzenDropDown<TValue>
    RadzenListBox<TValue>
    Implements
    IComponent
    IHandleEvent
    IHandleAfterRender
    IDisposable
    IRadzenFormComponent
    Inherited Members
    DataBoundFormComponent<T>._view
    DataBoundFormComponent<T>.GetClassList(string)
    DataBoundFormComponent<T>.FocusAsync()
    DataBoundFormComponent<T>.OnContextMenu(MouseEventArgs)
    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
    RadzenComponent.OnMouseEnter()
    RadzenComponent.OnMouseLeave()
    RadzenComponent.GetCssClass()
    RadzenComponent.GetId()
    RadzenComponent.GetComponentCssClass()
    RadzenComponent.Debounce(Func<Task>, int)
    RadzenComponent.RaiseContextMenu(MouseEventArgs)
    RadzenComponent.RaiseMouseEnter()
    RadzenComponent.RaiseMouseLeave()
    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(RenderTreeBuilder)
    ComponentBase.OnInitializedAsync()
    ComponentBase.StateHasChanged()
    ComponentBase.ShouldRender()
    ComponentBase.OnAfterRender(bool)
    ComponentBase.InvokeAsync(Action)
    ComponentBase.InvokeAsync(Func<Task>)
    ComponentBase.DispatchExceptionAsync(Exception)
    object.GetType()
    object.MemberwiseClone()
    object.ToString()
    object.Equals(object)
    object.Equals(object, object)
    object.ReferenceEquals(object, object)
    object.GetHashCode()
    Namespace: Radzen
    Assembly: Radzen.Blazor.dll
    Syntax
    public class DropDownBase<T> : DataBoundFormComponent<T>, IComponent, IHandleEvent, IHandleAfterRender, IDisposable, IRadzenFormComponent
    Type Parameters
    Name Description
    T

    Constructors

    DropDownBase()

    Base class of components that display a list of items.

    Declaration
    public DropDownBase()

    Fields

    list

    The list

    Declaration
    protected ElementReference? list
    Field Value
    Type Description
    ElementReference?

    search

    The search

    Declaration
    protected ElementReference search
    Field Value
    Type Description
    ElementReference

    selectedIndex

    The selected index

    Declaration
    protected int selectedIndex
    Field Value
    Type Description
    int

    selectedItem

    The selected item

    Declaration
    protected object selectedItem
    Field Value
    Type Description
    object

    selectedItems

    The selected items

    Declaration
    protected ISet<object> selectedItems
    Field Value
    Type Description
    ISet<object>

    Properties

    AllowClear

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

    Declaration
    [Parameter]
    public bool AllowClear { get; set; }
    Property Value
    Type Description
    bool

    true if clearing is allowed; otherwise, false.

    AllowFiltering

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

    Declaration
    [Parameter]
    public virtual bool AllowFiltering { get; set; }
    Property Value
    Type Description
    bool

    true if filtering is allowed; otherwise, false.

    AllowSelectAll

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

    Declaration
    [Parameter]
    public bool AllowSelectAll { get; set; }
    Property Value
    Type Description
    bool

    true if select all values is allowed; otherwise, false.

    AllowVirtualization

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

    Declaration
    [Parameter]
    public bool AllowVirtualization { get; set; }
    Property Value
    Type Description
    bool

    Count

    Specifies the total number of items in the data source.

    Declaration
    [Parameter]
    public int Count { get; set; }
    Property Value
    Type Description
    int

    Data

    Gets or sets the data.

    Declaration
    [Parameter]
    public override IEnumerable Data { get; set; }
    Property Value
    Type Description
    IEnumerable

    The data.

    Overrides
    DataBoundFormComponent<T>.Data

    DisabledProperty

    Gets or sets the disabled property.

    Declaration
    [Parameter]
    public string DisabledProperty { get; set; }
    Property Value
    Type Description
    string

    The disabled property.

    EmptyAriaLabel

    Gets or sets the empty value aria label text.

    Declaration
    [Parameter]
    public string EmptyAriaLabel { get; set; }
    Property Value
    Type Description
    string

    The empty value aria label text.

    FilterAsYouType

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

    Declaration
    [Parameter]
    public virtual bool FilterAsYouType { get; set; }
    Property Value
    Type Description
    bool

    true if filtering is allowed; otherwise, false.

    FilterDelay

    Gets or sets the filter delay.

    Declaration
    [Parameter]
    public int FilterDelay { get; set; }
    Property Value
    Type Description
    int

    The filter delay.

    HasValue

    Gets a value indicating whether this instance has value.

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

    true if this instance has value; otherwise, false.

    Overrides
    DataBoundFormComponent<T>.HasValue

    HeaderTemplate

    Gets or sets the header template.

    Declaration
    [Parameter]
    public RenderFragment HeaderTemplate { get; set; }
    Property Value
    Type Description
    RenderFragment

    The header template.

    ItemComparer

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

    Declaration
    [Parameter]
    public IEqualityComparer<object> ItemComparer { get; set; }
    Property Value
    Type Description
    IEqualityComparer<object>

    Items

    Gets the items.

    Declaration
    protected virtual IEnumerable<object> Items { get; }
    Property Value
    Type Description
    IEnumerable<object>

    The items.

    Multiple

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

    Declaration
    [Parameter]
    public bool Multiple { get; set; }
    Property Value
    Type Description
    bool

    true if multiple; otherwise, false.

    PageSize

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

    Declaration
    [Parameter]
    public int PageSize { get; set; }
    Property Value
    Type Description
    int

    PopupID

    Gets the popup identifier.

    Declaration
    protected string PopupID { get; }
    Property Value
    Type Description
    string

    The popup identifier.

    RemoveChipTitle

    Gets or sets the remove chip button title.

    Declaration
    [Parameter]
    public string RemoveChipTitle { get; set; }
    Property Value
    Type Description
    string

    The remove chip button title.

    ResetSelectedIndexOnFilter

    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
    [Parameter]
    public bool ResetSelectedIndexOnFilter { get; set; }
    Property Value
    Type Description
    bool

    true to reset selected index to -1 when filtering; otherwise, false.

    SearchAriaLabel

    Gets or sets the search aria label text.

    Declaration
    [Parameter]
    public string SearchAriaLabel { get; set; }
    Property Value
    Type Description
    string

    The search aria label text.

    SearchID

    Gets the search identifier.

    Declaration
    public string SearchID { get; }
    Property Value
    Type Description
    string

    The search identifier.

    SelectedItem

    Gets or sets the selected item.

    Declaration
    [Parameter]
    public object SelectedItem { get; set; }
    Property Value
    Type Description
    object

    The selected item.

    SelectedItemChanged

    Gets or sets the selected item changed.

    Declaration
    [Parameter]
    public EventCallback<object> SelectedItemChanged { get; set; }
    Property Value
    Type Description
    EventCallback<object>

    The selected item changed.

    Separator

    Gets or sets the item separator for Multiple dropdown.

    Declaration
    [Parameter]
    public string Separator { get; set; }
    Property Value
    Type Description
    string

    Item separator

    Template

    Gets or sets the template.

    Declaration
    [Parameter]
    public RenderFragment<dynamic> Template { get; set; }
    Property Value
    Type Description
    RenderFragment<dynamic>

    The template.

    ValueProperty

    Gets or sets the value property.

    Declaration
    [Parameter]
    public string ValueProperty { get; set; }
    Property Value
    Type Description
    string

    The value property.

    View

    Gets the view.

    Declaration
    protected override IEnumerable View { get; }
    Property Value
    Type Description
    IEnumerable

    The view.

    Overrides
    DataBoundFormComponent<T>.View

    VirtualizationOverscanCount

    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
    [Parameter]
    public int VirtualizationOverscanCount { get; set; }
    Property Value
    Type Description
    int

    Virtualize

    The Virtualize instance.

    Declaration
    public Virtualize<object> Virtualize { get; }
    Property Value
    Type Description
    Virtualize<object>

    Methods

    ClearAll()

    Clears all.

    Declaration
    protected Task ClearAll()
    Returns
    Type Description
    Task

    Dispose()

    Disposes this instance.

    Declaration
    public override void Dispose()
    Overrides
    DataBoundFormComponent<T>.Dispose()

    GetItemOrValueFromProperty(object, string)

    Gets the item or value from property.

    Declaration
    public object GetItemOrValueFromProperty(object item, string property)
    Parameters
    Type Name Description
    object item

    The item.

    string property

    The property.

    Returns
    Type Description
    object

    System.Object.

    GetValue()

    Gets the value.

    Declaration
    public override object GetValue()
    Returns
    Type Description
    object

    System.Object.

    Overrides
    DataBoundFormComponent<T>.GetValue()

    HandleKeyPress(KeyboardEventArgs, bool, bool?)

    Handles the key press.

    Declaration
    protected virtual Task HandleKeyPress(KeyboardEventArgs args, bool isFilter = false, bool? shouldSelectOnChange = null)
    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

    OnAfterRenderAsync(bool)

    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
    Task

    Task.

    Overrides
    RadzenComponent.OnAfterRenderAsync(bool)

    OnChange(ChangeEventArgs)

    Handles the Change event.

    Declaration
    protected void OnChange(ChangeEventArgs args)
    Parameters
    Type Name Description
    ChangeEventArgs args

    The ChangeEventArgs instance containing the event data.

    OnDataChanged()

    Called when [data changed].

    Declaration
    protected override Task OnDataChanged()
    Returns
    Type Description
    Task
    Overrides
    DataBoundFormComponent<T>.OnDataChanged()

    OnFilter(ChangeEventArgs)

    Handles the Filter event.

    Declaration
    protected virtual Task OnFilter(ChangeEventArgs args)
    Parameters
    Type Name Description
    ChangeEventArgs args

    The ChangeEventArgs instance containing the event data.

    Returns
    Type Description
    Task

    OnFilterKeyPress(KeyboardEventArgs)

    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

    OnInitialized()

    Called by the Blazor runtime.

    Declaration
    protected override void OnInitialized()
    Overrides
    RadzenComponent.OnInitialized()

    OnKeyPress(KeyboardEventArgs, bool?)

    Handles the KeyPress event.

    Declaration
    protected virtual Task OnKeyPress(KeyboardEventArgs args, bool? shouldSelectOnChange = null)
    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

    OnParametersSet()

    Base class of components that display a list of items.

    Declaration
    protected override void OnParametersSet()
    Overrides
    ComponentBase.OnParametersSet()

    OnParametersSetAsync()

    Called when [parameters set asynchronous].

    Declaration
    protected override Task OnParametersSetAsync()
    Returns
    Type Description
    Task

    Task.

    Overrides
    ComponentBase.OnParametersSetAsync()

    OnSelectItem(object, bool)

    Called when [select item].

    Declaration
    protected virtual Task OnSelectItem(object item, bool isFromKey = false)
    Parameters
    Type Name Description
    object item

    The item.

    bool isFromKey

    if set to true [is from key].

    Returns
    Type Description
    Task

    OpenPopup(string, bool, bool)

    Opens the popup.

    Declaration
    protected virtual Task OpenPopup(string key = "ArrowDown", bool isFilter = false, bool isFromClick = false)
    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

    OpenPopupScript()

    Opens the popup script.

    Declaration
    protected string OpenPopupScript()
    Returns
    Type Description
    string

    System.String.

    OpenPopupScriptFromParent()

    Opens the popup script from parent.

    Declaration
    protected string OpenPopupScriptFromParent()
    Returns
    Type Description
    string

    System.String.

    Reset()

    Resets this instance.

    Declaration
    public void Reset()

    SelectAll()

    Selects all.

    Declaration
    protected virtual Task SelectAll()
    Returns
    Type Description
    Task

    SelectItem(object, bool)

    Selects the item.

    Declaration
    public Task SelectItem(object item, bool raiseChange = true)
    Parameters
    Type Name Description
    object item

    The item.

    bool raiseChange

    if set to true [raise change].

    Returns
    Type Description
    Task

    SelectItemFromValue(object)

    Selects the item from value.

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

    The value.

    SetParametersAsync(ParameterView)

    Set parameters as an asynchronous operation.

    Declaration
    public override Task SetParametersAsync(ParameterView parameters)
    Parameters
    Type Name Description
    ParameterView parameters

    The parameters.

    Returns
    Type Description
    Task

    A Task representing the asynchronous operation.

    Overrides
    DataBoundFormComponent<T>.SetParametersAsync(ParameterView)

    Implements

    IComponent
    IHandleEvent
    IHandleAfterRender
    IDisposable
    IRadzenFormComponent

    Introducing Radzen Blazor Studio

    Radzen Blazor Studio is a software development environment that empowers developers to design, build and deploy Blazor applications without the traditional hurdles. Write less code and get more done.

    Learn More

    Download Now
    Download Now
    In This Article
    Back to top Radzen Blazor Components, © 2018-2025 Radzen. Source Code licensed under MIT