menu

Blazor

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

    Show / Hide Table of Contents

    Class ChangeEventArgs<TValue, TItem>

    Provides event data for a change event, which occurs when the value or selected item changes in a supporting Syncfusion dropdown component.

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

    The value type(s) (e.g., string, int) of the dropdown.

    TItem

    The type of the bound item for the dropdown value (e.g., a POCO or string).

    Remarks

    ChangeEventArgs can be used to identify the new and previous selection, whether the user made the change, and allows for cancellation of a value change before it commits to the model.

    Examples
    void OnChange(ChangeEventArgs<string, MyItem> args)
    {
        if (args.IsInteracted && args.Value != args.PreviousItemData?.Id)
            args.Cancel = true;
    }

    Constructors

    ChangeEventArgs()

    Declaration
    public ChangeEventArgs()

    Properties

    Cancel

    Gets or sets a flag to cancel this value or selection change in the dropdown.

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

    true to cancel the change; otherwise, false. Default: false.

    E

    (Obsolete) Original browser event for backward compatibility only.

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

    Element

    (Obsolete) DOM element reference for legacy integrations only.

    Declaration
    public DOM Element { get; set; }
    Property Value
    Type
    DOM

    IsInteracted

    Gets or sets a value indicating whether the change event was triggered by user interaction.

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

    true if this change came from the user; otherwise, false.

    Item

    (Obsolete) Previously selected DOM item. For legacy use only.

    Declaration
    public DOM Item { get; set; }
    Property Value
    Type
    DOM

    ItemData

    Gets information about the data item currently selected by the user.

    Declaration
    public TItem ItemData { get; }
    Property Value
    Type
    TItem

    PreviousItem

    (Obsolete) Previously selected DOM item before this change. For legacy use only.

    Declaration
    public DOM PreviousItem { get; set; }
    Property Value
    Type
    DOM

    PreviousItemData

    Gets information about the data item that was previously selected before this event.

    Declaration
    public TItem PreviousItemData { get; }
    Property Value
    Type
    TItem

    Value

    Gets or sets the final selected value for this change event.

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