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
    System.Object
    RadzenComponent
    DataBoundFormComponent<T>
    DropDownBase<T>
    RadzenDropDown<TValue>
    RadzenDropDownDataGrid<TValue>
    RadzenListBox<TValue>
    Implements
    IDisposable
    IRadzenFormComponent
    Inherited Members
    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>._view
    DataBoundFormComponent<T>.EditContext
    DataBoundFormComponent<T>.FieldIdentifier
    DataBoundFormComponent<T>.ValueExpression
    DataBoundFormComponent<T>.GetClassList(String)
    DataBoundFormComponent<T>.FocusAsync()
    DataBoundFormComponent<T>.FormFieldContext
    DataBoundFormComponent<T>.CurrentPlaceholder
    DataBoundFormComponent<T>.OnContextMenu(MouseEventArgs)
    RadzenComponent.Attributes
    RadzenComponent.Element
    RadzenComponent.MouseEnter
    RadzenComponent.MouseLeave
    RadzenComponent.ContextMenu
    RadzenComponent.Culture
    RadzenComponent.DefaultCulture
    RadzenComponent.OnMouseEnter()
    RadzenComponent.OnMouseLeave()
    RadzenComponent.OnContextMenu(Microsoft.AspNetCore.Components.Web.MouseEventArgs)
    RadzenComponent.Style
    RadzenComponent.Visible
    RadzenComponent.GetCssClass()
    RadzenComponent.GetId()
    RadzenComponent.GetComponentCssClass()
    RadzenComponent.Debounce(Func<Task>, Int32)
    RadzenComponent.UniqueID
    RadzenComponent.JSRuntime
    RadzenComponent.IsJSRuntimeAvailable
    RadzenComponent.Reference
    RadzenComponent.RaiseContextMenu(Microsoft.AspNetCore.Components.Web.MouseEventArgs)
    RadzenComponent.RaiseMouseEnter()
    RadzenComponent.RaiseMouseLeave()
    RadzenComponent.CurrentStyle
    Namespace: Radzen
    Assembly: Radzen.Blazor.dll
    Syntax
    public class DropDownBase<T> : DataBoundFormComponent<T>, IDisposable, IRadzenFormComponent
    Type Parameters
    Name Description
    T

    Fields

    list

    The list

    Declaration
    protected ElementReference? list
    Field Value
    Type Description
    System.Nullable<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
    System.Int32

    selectedItem

    The selected item

    Declaration
    protected object selectedItem
    Field Value
    Type Description
    System.Object

    selectedItems

    The selected items

    Declaration
    protected ISet<object> selectedItems
    Field Value
    Type Description
    ISet<System.Object>

    Properties

    AllowClear

    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
    System.Boolean

    true if clearing is allowed; otherwise, false.

    AllowFiltering

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

    Declaration
    public virtual bool AllowFiltering { get; set; }
    Property Value
    Type Description
    System.Boolean

    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
    public bool AllowSelectAll { get; set; }
    Property Value
    Type Description
    System.Boolean

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

    AllowVirtualization

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

    Declaration
    public bool AllowVirtualization { get; set; }
    Property Value
    Type Description
    System.Boolean

    Count

    Specifies the total number of items in the data source.

    Declaration
    public int Count { get; set; }
    Property Value
    Type Description
    System.Int32

    Data

    Gets or sets the data.

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

    The data.

    Overrides
    Radzen.DataBoundFormComponent<T>.Data

    DisabledProperty

    Gets or sets the disabled property.

    Declaration
    public string DisabledProperty { get; set; }
    Property Value
    Type Description
    System.String

    The disabled property.

    EmptyAriaLabel

    Gets or sets the empty value aria label text.

    Declaration
    public string EmptyAriaLabel { get; set; }
    Property Value
    Type Description
    System.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
    public virtual bool FilterAsYouType { get; set; }
    Property Value
    Type Description
    System.Boolean

    true if filtering is allowed; otherwise, false.

    FilterDelay

    Gets or sets the filter delay.

    Declaration
    public int FilterDelay { get; set; }
    Property Value
    Type Description
    System.Int32

    The filter delay.

    HasValue

    Gets a value indicating whether this instance has value.

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

    true if this instance has value; otherwise, false.

    Overrides
    Radzen.DataBoundFormComponent<T>.HasValue

    HeaderTemplate

    Gets or sets the header template.

    Declaration
    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
    public IEqualityComparer<object> ItemComparer { get; set; }
    Property Value
    Type Description
    IEqualityComparer<System.Object>

    Items

    Gets the items.

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

    The items.

    Multiple

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

    Declaration
    public bool Multiple { get; set; }
    Property Value
    Type Description
    System.Boolean

    true if multiple; otherwise, false.

    PageSize

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

    Declaration
    public int PageSize { get; set; }
    Property Value
    Type Description
    System.Int32

    PopupID

    Gets the popup identifier.

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

    The popup identifier.

    RemoveChipTitle

    Gets or sets the remove chip button title.

    Declaration
    public string RemoveChipTitle { get; set; }
    Property Value
    Type Description
    System.String

    The remove chip button title.

    SearchAriaLabel

    Gets or sets the search aria label text.

    Declaration
    public string SearchAriaLabel { get; set; }
    Property Value
    Type Description
    System.String

    The search aria label text.

    SearchID

    Gets the search identifier.

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

    The search identifier.

    SelectedItem

    Gets or sets the selected item.

    Declaration
    public object SelectedItem { get; set; }
    Property Value
    Type Description
    System.Object

    The selected item.

    SelectedItemChanged

    Gets or sets the selected item changed.

    Declaration
    public EventCallback<object> SelectedItemChanged { get; set; }
    Property Value
    Type Description
    EventCallback<System.Object>

    The selected item changed.

    Separator

    Gets or sets the item separator for Multiple dropdown.

    Declaration
    public string Separator { get; set; }
    Property Value
    Type Description
    System.String

    Item separator

    Template

    Gets or sets the template.

    Declaration
    public RenderFragment<dynamic> Template { get; set; }
    Property Value
    Type Description
    RenderFragment<System.Object>

    The template.

    ValueProperty

    Gets or sets the value property.

    Declaration
    public string ValueProperty { get; set; }
    Property Value
    Type Description
    System.String

    The value property.

    View

    Gets the view.

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

    The view.

    Overrides
    Radzen.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
    public int VirtualizationOverscanCount { get; set; }
    Property Value
    Type Description
    System.Int32

    Virtualize

    The Virtualize instance.

    Declaration
    public Microsoft.AspNetCore.Components.Web.Virtualization.Virtualize<object> Virtualize { get; }
    Property Value
    Type Description
    Microsoft.AspNetCore.Components.Web.Virtualization.Virtualize<System.Object>

    Methods

    ClearAll()

    Clears all.

    Declaration
    protected async Threading.Tasks.Task ClearAll()
    Returns
    Type Description
    System.Threading.Tasks.Task

    Dispose()

    Disposes this instance.

    Declaration
    public override void Dispose()
    Overrides
    Radzen.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
    System.Object item

    The item.

    System.String property

    The property.

    Returns
    Type Description
    System.Object

    System.Object.

    GetValue()

    Gets the value.

    Declaration
    public override object GetValue()
    Returns
    Type Description
    System.Object

    System.Object.

    Overrides
    Radzen.DataBoundFormComponent<T>.GetValue()

    HandleKeyPress(Microsoft.AspNetCore.Components.Web.KeyboardEventArgs, Boolean, Nullable<Boolean>)

    Handles the key press.

    Declaration
    protected virtual async Threading.Tasks.Task HandleKeyPress(Microsoft.AspNetCore.Components.Web.KeyboardEventArgs args, bool isFilter = false, bool? shouldSelectOnChange = null)
    Parameters
    Type Name Description
    Microsoft.AspNetCore.Components.Web.KeyboardEventArgs args

    The instance containing the event data.

    System.Boolean isFilter

    if set to true [is filter].

    System.Nullable<System.Boolean> shouldSelectOnChange

    Should select item on item change with keyboard.

    Returns
    Type Description
    System.Threading.Tasks.Task

    OnAfterRenderAsync(Boolean)

    Called when [after render asynchronous].

    Declaration
    protected override Task OnAfterRenderAsync(bool firstRender)
    Parameters
    Type Name Description
    System.Boolean firstRender

    if set to true [first render].

    Returns
    Type Description
    Task

    Task.

    Overrides
    RadzenComponent.OnAfterRenderAsync(Boolean)

    OnChange(ChangeEventArgs)

    Handles the Change event.

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

    The instance containing the event data.

    OnDataChanged()

    Called when [data changed].

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

    OnFilter(ChangeEventArgs)

    Handles the Filter event.

    Declaration
    protected virtual async Threading.Tasks.Task OnFilter(ChangeEventArgs args)
    Parameters
    Type Name Description
    ChangeEventArgs args

    The instance containing the event data.

    Returns
    Type Description
    System.Threading.Tasks.Task

    OnFilterKeyPress(Microsoft.AspNetCore.Components.Web.KeyboardEventArgs)

    Handles the FilterKeyPress event.

    Declaration
    protected virtual async Threading.Tasks.Task OnFilterKeyPress(Microsoft.AspNetCore.Components.Web.KeyboardEventArgs args)
    Parameters
    Type Name Description
    Microsoft.AspNetCore.Components.Web.KeyboardEventArgs args

    The instance containing the event data.

    Returns
    Type Description
    System.Threading.Tasks.Task

    OnInitialized()

    Called by the Blazor runtime.

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

    OnKeyPress(Microsoft.AspNetCore.Components.Web.KeyboardEventArgs, Nullable<Boolean>)

    Handles the KeyPress event.

    Declaration
    protected virtual async Threading.Tasks.Task OnKeyPress(Microsoft.AspNetCore.Components.Web.KeyboardEventArgs args, bool? shouldSelectOnChange = null)
    Parameters
    Type Name Description
    Microsoft.AspNetCore.Components.Web.KeyboardEventArgs args

    The instance containing the event data.

    System.Nullable<System.Boolean> shouldSelectOnChange

    Should select item on item change with keyboard.

    Returns
    Type Description
    System.Threading.Tasks.Task

    OnParametersSet()

    Declaration
    protected override void OnParametersSet()

    OnParametersSetAsync()

    Called when [parameters set asynchronous].

    Declaration
    protected override Task OnParametersSetAsync()
    Returns
    Type Description
    Task

    Task.

    OnSelectItem(Object, Boolean)

    Called when [select item].

    Declaration
    protected virtual async Threading.Tasks.Task OnSelectItem(object item, bool isFromKey = false)
    Parameters
    Type Name Description
    System.Object item

    The item.

    System.Boolean isFromKey

    if set to true [is from key].

    Returns
    Type Description
    System.Threading.Tasks.Task

    OpenPopup(String, Boolean, Boolean)

    Opens the popup.

    Declaration
    protected virtual async Threading.Tasks.Task OpenPopup(string key = "ArrowDown", bool isFilter = false, bool isFromClick = false)
    Parameters
    Type Name Description
    System.String key

    The key.

    System.Boolean isFilter

    if set to true [is filter].

    System.Boolean isFromClick

    if set to true [is from click].

    Returns
    Type Description
    System.Threading.Tasks.Task

    OpenPopupScript()

    Opens the popup script.

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

    System.String.

    OpenPopupScriptFromParent()

    Opens the popup script from parent.

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

    System.String.

    Reset()

    Resets this instance.

    Declaration
    public void Reset()

    SelectAll()

    Selects all.

    Declaration
    protected virtual async Threading.Tasks.Task SelectAll()
    Returns
    Type Description
    System.Threading.Tasks.Task

    SelectItem(Object, Boolean)

    Selects the item.

    Declaration
    public async Threading.Tasks.Task SelectItem(object item, bool raiseChange = true)
    Parameters
    Type Name Description
    System.Object item

    The item.

    System.Boolean raiseChange

    if set to true [raise change].

    Returns
    Type Description
    System.Threading.Tasks.Task

    SelectItemFromValue(Object)

    Selects the item from value.

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

    The value.

    SetParametersAsync(ParameterView)

    Set parameters as an asynchronous operation.

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

    The parameters.

    Returns
    Type Description
    Task

    A Task representing the asynchronous operation.

    Overrides
    Radzen.DataBoundFormComponent<T>.SetParametersAsync(ParameterView)

    Implements

    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