menu

Blazor

  • Code Examples
  • Upgrade Guide
  • User Guide
  • Demos
  • Support
  • Forums
  • Download
Class DropDownListModel<TValue, TItem> - Blazor API Reference | Syncfusion

    Show / Hide Table of Contents

    Class DropDownListModel<TValue, TItem>

    Interface for a class DropDownList.

    Inheritance
    System.Object
    DropDownListModel<TValue, TItem>
    Namespace: Syncfusion.Blazor.DropDowns
    Assembly: Syncfusion.Blazor.dll
    Syntax
    public class DropDownListModel<TValue, TItem> : Object
    Type Parameters
    Name Description
    TValue

    Specifies the type of DropDownListModel.

    TItem

    Specifies the typr of value.

    Constructors

    DropDownListModel()

    Declaration
    public DropDownListModel()

    Properties

    ActionBegin

    Gets or sets the ActionBegin event arguments.

    Declaration
    public ActionBeginEventArgs ActionBegin { get; set; }
    Property Value
    Type
    ActionBeginEventArgs

    ActionComplete

    Gets or sets the ActionComplete event arguments.

    Declaration
    public ActionCompleteEventArgs ActionComplete { get; set; }
    Property Value
    Type
    ActionCompleteEventArgs

    ActionFailure

    Triggers when the data fetch request from the remote server fails.

    Declaration
    public EventCallback<object> ActionFailure { get; set; }
    Property Value
    Type
    Microsoft.AspNetCore.Components.EventCallback<System.Object>

    ActionFailureTemplate

    Gets or sets the template that is used as the popup list content of the component when the data fetch request from the remote server fails.

    Declaration
    public RenderFragment ActionFailureTemplate { get; set; }
    Property Value
    Type
    Microsoft.AspNetCore.Components.RenderFragment

    AllowFiltering

    Gets or sets a value indicating whether to show the filter bar (search box) of the component when AllowFiltering is set to true. The filter action retrieves matched items through the Filtering event based on the characters typed in the search TextBox.

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

    BeforeOpen

    Gets or sets the BeforeOpen event arguments.

    Declaration
    public BeforeOpenEventArgs BeforeOpen { get; set; }
    Property Value
    Type
    BeforeOpenEventArgs

    Blur

    Triggers when focus moves out from the component.

    Declaration
    public EventCallback<object> Blur { get; set; }
    Property Value
    Type
    Microsoft.AspNetCore.Components.EventCallback<System.Object>

    Change

    Triggers when an item in a popup is selected or when the model value is changed by user.

    Use Change event to configure the cascading DropDownList.

    Declaration
    public EventCallback<object> Change { get; set; }
    Property Value
    Type
    Microsoft.AspNetCore.Components.EventCallback<System.Object>

    Close

    Triggers when the popup is closed.

    Declaration
    public EventCallback<object> Close { get; set; }
    Property Value
    Type
    Microsoft.AspNetCore.Components.EventCallback<System.Object>

    Created

    Triggers when the component is created.

    Declaration
    public EventCallback<object> Created { get; set; }
    Property Value
    Type
    Microsoft.AspNetCore.Components.EventCallback<System.Object>

    CssClass

    Gets or sets the CSS class name that can be appended with the root element of the DropDownList. One or more custom CSS classes can be added to a DropDownList.

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

    DataBound

    Gets or sets the DataBound event arguments.

    Declaration
    public DataBoundEventArgs DataBound { get; set; }
    Property Value
    Type
    DataBoundEventArgs

    DataSource

    Gets or sets the data source that is bound to the component. It can be an array of JSON Objects or an instance of DataManager.

    Declaration
    public IEnumerable<TItem> DataSource { get; set; }
    Property Value
    Type
    System.Collections.Generic.IEnumerable<TItem>

    Destroyed

    Triggers when the component is destroyed.

    Declaration
    public EventCallback<object> Destroyed { get; set; }
    Property Value
    Type
    Microsoft.AspNetCore.Components.EventCallback<System.Object>

    Enabled

    Gets or sets a value indicating whether the DropDownList allows user interaction.

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

    EnableRtl

    Gets or sets a value indicating whether to enable or disable rendering the component in right-to-left direction.

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

    EnableVirtualization

    Gets or sets a value indicating whether virtual scrolling is enabled or not. The Virtual Scrolling feature is used to display a large amount of data without buffering the entire load of a huge database records in the DropDowns. When scrolling, the datamanager request is sent to fetch some amount of data from the server dynamically.

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

    FilterBarPlaceholder

    Gets or sets the value to be displayed as a watermark text on the filter bar.

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

    Filtering

    Triggers on typing a character in the filter bar when the AllowFiltering is enabled.

    Declaration
    public EventCallback<object> Filtering { get; set; }
    Property Value
    Type
    Microsoft.AspNetCore.Components.EventCallback<System.Object>

    FilterType

    Gets or sets a value indicating the filter type that the component should use when searching.

    Declaration
    public FilterType FilterType { get; set; }
    Property Value
    Type
    FilterType

    FloatLabelType

    Gets or sets the floating label behavior of the DropDownList that the placeholder text floats above the DropDownList based on the following values: Never, Always, or Auto. If not specified, the default value is Never.

    Declaration
    public FloatLabelType FloatLabelType { get; set; }
    Property Value
    Type
    FloatLabelType

    Focus

    Triggers when the component is focused.

    Declaration
    public EventCallback<object> Focus { get; set; }
    Property Value
    Type
    Microsoft.AspNetCore.Components.EventCallback<System.Object>

    FooterTemplate

    Gets or sets the template design assigned to the footer container of the popup list.

    Declaration
    public RenderFragment FooterTemplate { get; set; }
    Property Value
    Type
    Microsoft.AspNetCore.Components.RenderFragment

    HeaderTemplate

    Gets or sets the template design assigned to the header container of the popup list.

    Declaration
    public RenderFragment HeaderTemplate { get; set; }
    Property Value
    Type
    Microsoft.AspNetCore.Components.RenderFragment

    HtmlAttributes

    Gets or sets the additional input attributes, such as disabled or value, to be added to the root element. If you configure both the property and equivalent input attribute, the component considers the property value.

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

    IgnoreAccent

    Gets or sets a value indicating whether to ignore diacritic characters or accents when filtering. By default, diacritic characters or accents are considered.

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

    IgnoreCase

    Gets or sets a value indicating whether the search should be case-sensitive. By default, it is case-sensitive.

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

    Index

    Gets or sets the index of the selected item in the component.

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

    Open

    Triggers when the popup opens.

    Declaration
    public EventCallback<object> Open { get; set; }
    Property Value
    Type
    Microsoft.AspNetCore.Components.EventCallback<System.Object>

    Placeholder

    Gets or sets the hint or placeholder text that is shown until the user focuses or enters a value in the DropDownList, depending on the FloatLabelType property.

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

    PopupDisplayMode

    Gets or sets a value indicating the display mode for the popup.

    Declaration
    public PopupDisplayMode PopupDisplayMode { get; set; }
    Property Value
    Type
    PopupDisplayMode

    PopupHeight

    Gets or sets the height of the popup list.

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

    PopupWidth

    Gets or sets the width of the popup list. By default, the popup width sets based on the width of the component.

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

    Query

    Gets or sets the external Query to be executed along with data processing.

    Declaration
    public Query Query { get; set; }
    Property Value
    Type
    Query

    Readonly

    Gets or sets a value indicating whether the DropDownList allows the user to change the value.

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

    Select

    Triggers when an item in the popup is selected by the user either with mouse/tap or with keyboard navigation.

    Declaration
    public EventCallback<object> Select { get; set; }
    Property Value
    Type
    Microsoft.AspNetCore.Components.EventCallback<System.Object>

    ShowClearButton

    Gets or sets a value indicating whether to show or hide the clear button. When the clear button is clicked, Value, Text, and Index properties are reset to null.

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

    Text

    Gets or sets the display text of the selected item in the component.

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

    Value

    Gets or sets the value of the selected item in the component.

    Declaration
    public TValue Value { get; set; }
    Property Value
    Type
    TValue

    ValueTemplate

    Gets or sets the template that is used for the selected list item in the input element of the component.

    Declaration
    public RenderFragment<TValue> ValueTemplate { get; set; }
    Property Value
    Type
    Microsoft.AspNetCore.Components.RenderFragment<TValue>

    Width

    Gets or sets the width of the component. By default, the component width is set based on the width of its parent container. You can also set the width in pixel values.

    Declaration
    public string Width { get; set; }
    Property Value
    Type
    System.String
    Back to top Generated by DocFX
    Copyright © 2001 - 2025 Syncfusion Inc. All Rights Reserved