menu

Blazor

  • Code Examples
  • Upgrade Guide
  • User Guide
  • Demos
  • Support
  • Forums
  • Download
Class MentionValueSelectedEventArgs<T> - Blazor API Reference | Syncfusion

    Show / Hide Table of Contents

    Class MentionValueSelectedEventArgs<T>

    Provides event data for the ValueSelected event in the Mention component.

    Inheritance
    System.Object
    MentionValueSelectedEventArgs<T>
    Namespace: Syncfusion.Blazor.DropDowns
    Assembly: Syncfusion.Blazor.dll
    Syntax
    public class MentionValueSelectedEventArgs<T> : Object
    Type Parameters
    Name
    T
    Remarks

    You can use this event data to determine which item was selected by the user and react accordingly in your application logic.

    Examples

    Example usage to handle the ValueSelected event:

    <SfMention TValue="Employee" DataSource="@Employees" ValueSelected="OnMentionSelected">
    </SfMention>
    @code {
        private void OnMentionSelected(MentionValueSelectedEventArgs<Employee> args)
        {
            var selectedItem = args.ItemData;
            var value = args.Value;
            // Handle selection logic
        }
    }

    Constructors

    MentionValueSelectedEventArgs()

    Declaration
    public MentionValueSelectedEventArgs()

    Properties

    ItemData

    Gets the selected item from the SfMention<TItem> data source when an item is chosen.

    Declaration
    public T ItemData { get; }
    Property Value
    Type Description
    T

    The selected item of type T from the data source. The default value is null if no item is selected.

    Remarks

    Use the ItemData property to access the full item object associated with the user's selection in the Mention list.

    Value

    Gets the value of the selected item as a string representation.

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

    A string representing the selected value in the Mention component. The default value is null if no value is selected.

    Remarks

    This property provides the value associated with the selected item. It is frequently used to update text fields or insert mention strings into the editor or textbox.

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