menu

Blazor

  • Code Examples
  • Upgrade Guide
  • User Guide
  • Demos
  • Support
  • Forums
  • Download
Class ComboBoxModel - Blazor API Reference | Syncfusion

    Show / Hide Table of Contents

    Class ComboBoxModel

    Represents the configuration model for the Syncfusion ComboBox component, providing data binding, filtering, event handling, and UI customization options.

    Inheritance
    System.Object
    ComboBoxModel
    Namespace: Syncfusion.Blazor.DropDowns
    Assembly: Syncfusion.Blazor.dll
    Syntax
    public class ComboBoxModel : Object
    Remarks

    ComboBoxModel is used to control the behavior, appearance, and data operations of Syncfusion ComboBox.

    Examples
    <SfComboBox TValue="string" DataSource="@(new List<string>{"Apple", "Banana"})" Placeholder="Pick fruit">
        <ComboBoxEvents OnChange="@(args => ComboChanged(args))" />
    </SfComboBox>
    <SfComboBox TValue="string" DataSource="@(new List<string>{"Apple", "Banana"})" Placeholder="Pick a fruit">
        <ComboBoxEvents OnChange="@(args => ComboChanged(args))" />
    </SfComboBox>

    Constructors

    ComboBoxModel()

    Declaration
    public ComboBoxModel()

    Properties

    ActionBegin

    Gets or sets the event data raised when a remote data fetch is initiated for the ComboBox component.

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

    An ActionBeginEventArgs instance with event information for fetch initiation.

    Remarks

    This event allows custom logic or modification of ComboBox queries prior to data retrieval. For more details, see ActionBeginEventArgs.

    Examples

    Refer to ActionBeginEventArgs for use-cases and structure.

    ActionComplete

    Gets or sets the event data for when remote data fetching completes successfully.

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

    An ActionCompleteEventArgs instance containing successful completion details.

    Remarks

    This event fires after a remote fetch or asynchronous data call finishes. Use it to manage post-fetch logic. See ActionCompleteEventArgs for more info.

    Examples

    Utilize for end-to-end APIs when asynchronous requests resolve.

    ActionFailure

    Gets or sets an event callback triggered when a data fetch request from a remote server fails.

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

    An EventCallback<object> for error/failure handling logic.

    Remarks

    Attach error handlers to respond gracefully if a remote fetch fails for any reason.

    Examples
    @code {
        void OnFailure(object args) { /* Handle fetch error */ }
    }

    AllowCustom

    Gets or sets a value controlling whether the ComboBox allows the user to create values not present in the provided data source.

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

    true to enable user-generated custom values; false to restrict to known list values. Default is true.

    Remarks

    Use to implement tagging, flexible data entry, or user-driven value creation. If false, ComboBox is strictly list-bound.

    Examples

    Enable for flexible forms where entry is not list-limited.

    Autofill

    Gets or sets whether ComboBox auto-suggests and pre-selects the first matched item as user types.

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

    true for autofill, false for manual selection. Default is false.

    Remarks

    This makes keyboard selection rapid and can guide users to most likely matches for search-heavy lists.

    Examples

    Perfect for quick lookups or catalogues where primary entry is predictable.

    BeforeOpen

    Gets or sets the event arguments raised right before the ComboBox popup opens.

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

    A BeforeOpenEventArgs instance representing event data before popup rendering.

    Remarks

    Use this event to conditionally cancel, or dynamically style/position, the dropdown popup on open.

    Examples

    Leverage BeforeOpenEventArgs to set Cancel = true if a popup should not display.

    Blur

    Gets or sets the event callback triggered when focus leaves the ComboBox (a blur event).

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

    An EventCallback<object> triggered on ComboBox blur; commonly used for focus validation.

    Remarks

    This event is triggered when the input focus is lost, which is commonly used for validation or UI cleanup operations.

    Examples

    Listen for blur to validate user input or reset error states.

    Change

    Gets or sets an event callback triggered when an item is selected or the model value changes via user input.

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

    An EventCallback<object> for ComboBox value or selection changes.

    Remarks

    This callback is fired whenever the selection changes, allowing configuration like cascading, custom validation, or responding to user input. See the OnChange event for full details.

    Examples
    @code {
        void ComboChanged(object args) {
            // Your change logic
        }
    }

    Close

    Gets or sets the event callback invoked when the ComboBox popup is closed.

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

    An EventCallback<object> called after the popup closes.

    Remarks

    Use this event to handle UI cleanup, trigger notifications, or persist popup dismissals.

    Examples

    Detect when users finish selection by closing the popup.

    Created

    Gets or sets the event callback raised after the ComboBox component is fully initialized and created.

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

    An EventCallback<object> for post-creation logic or composition.

    Remarks

    This event is ideal for external initialization logic, dynamic data loading, or applying global state to a just-constructed ComboBox.

    Examples

    Listen for ComboBox creation to trigger data binding or analytics.

    CustomValueSpecifier

    Gets or sets an event callback triggered when the ComboBox user sets or accepts a custom value not found in the available list.

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

    An EventCallback<object> for custom value logic events.

    Remarks

    Implement this to support tagging or creation of new user-defined options directly in ComboBox UI.

    Examples

    See event data for details on providing custom entry support.

    DataBound

    Gets or sets the arguments provided when the ComboBox data binding completes.

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

    A DataBoundEventArgs instance with completion and status information.

    Remarks

    Bind this property to react after successful data load into the ComboBox.

    Examples

    Monitor for loading completion using DataBoundEventArgs.

    DebounceDelay

    Gets or sets the number of milliseconds to wait before filtering after user input (if filtering is enabled).

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

    An int indicating the debounce delay in milliseconds. Default is 300 ms.

    Remarks

    This affects filtering responsiveness; delays reduce network/API load for remote data calls. Lower values increase UI reactivity; higher values help throttle calls with slow endpoints.

    Examples

    Set to 500 for slow API filtering, 100 for instant local search.

    Destroyed

    Gets or sets an event callback triggered when the ComboBox component is disposed (destroyed/unmounted).

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

    An EventCallback<object> for destruction or cleanup scenarios.

    Remarks

    Attach analytics, release resources, or execute teardown code on component destroy.

    Examples

    Release resources on Destroyed event.

    EnableVirtualization

    Gets or sets whether virtualization is enabled for ComboBox, improving performance in large data sets (1000+ items).

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

    true enables virtualization/chunked rendering; false disables for standard UI. Default is false.

    Remarks

    Turn on for scenarios where large volumes of data would otherwise degrade performance. Combines well with virtual scroll and lazy data load.

    Examples

    Use large-data ComboBox for geographical selection with virtualization.

    Filtering

    Gets or sets the event callback triggered on each character typed in ComboBox (filter/search event).

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

    An EventCallback<object> for real-time filter, search, or lookup logic.

    Remarks

    Leverage this callback for dynamic queries, external data API integration, or custom filtering implementations.

    Examples

    Monitor typing for filtering and dynamic API calls.

    Focus

    Gets or sets an event callback called when the ComboBox receives focus.

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

    An EventCallback<object> for focus/activation UI logic.

    Remarks

    Useful for applying contextual highlighting or input cues as users navigate with keyboard or screen readers.

    Examples

    Emphasize the control or show UI aids on focus.

    Open

    Gets or sets an event callback triggered when the ComboBox popup opens (shows dropdown list).

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

    An EventCallback<object> called when the popup is displayed.

    Remarks

    This event is used for analytics, lazy loading, or providing interactive guidance when a user expands the ComboBox.

    Examples
    @code {
        void OnPopupOpen(object args) {
            // React to dropdown showing
        }
    }

    Select

    Gets or sets an event callback triggered when an item in the popup is selected by user action (mouse, tap, or keyboard selection).

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

    An EventCallback<object> for item selection notifications.

    Remarks

    Respond to user selection and update models or UI accordingly.

    Examples
    @code {
        void OnSelect(object args) {
            // Handle item selection
        }
    }

    ShowClearButton

    Gets or sets whether the ComboBox clear button is shown, allowing users to quickly remove value selections.

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

    true enables the visible clear button, false disables. Default is true.

    Remarks

    Clicking the clear button resets Value, Text, and Index properties. Recommended for improved user experience and quick resets.

    Examples

    Best for forms with single-choice rapid switching requirements.

    Back to top Generated by DocFX
    Copyright © 2001 - 2025 Syncfusion Inc. All Rights Reserved