Class ChangeArgs<TChecked>
Provides data for the value change event of radio button components.
Inheritance
Namespace: Syncfusion.Blazor.Toolkit.Inputs
Assembly: Syncfusion.Blazor.Toolkit.dll
Syntax
public class ChangeArgs<TChecked> : Object
Type Parameters
| Name | Description |
|---|---|
| TChecked | The type of the radio button value. |
Remarks
This class contains information about the changed value and the event that triggered the change. It is used by radio button components to provide context about selection changes.
Examples
The following example demonstrates handling a radio button value change:
<SfRadioButton TValue="string" @bind-Value="selectedOption"
Value="option1" ValueChange="@OnRadioChanged" />
@code {
private string selectedOption;
private void OnRadioChanged(ChangeArgs<string> args)
{
string newValue = args.Value;
Console.WriteLine($"Radio button changed to: {newValue}");
}
}
Constructors
ChangeArgs()
Declaration
public ChangeArgs()
Properties
Event
Gets or sets the event arguments associated with the value change.
Declaration
public EventArgs Event { get; set; }
Property Value
| Type | Description |
|---|---|
| System.EventArgs | An System.EventArgs object containing basic event information. |
Remarks
This property provides basic event context for the radio button value change. Unlike Event, this does not contain mouse-specific information.
Examples
private void OnRadioChanged(ChangeArgs<string> args)
{
var eventArgs = args.Event;
// Basic event information
}
Value
Gets or sets the new value after the radio button selection changed.
Declaration
public TChecked Value { get; set; }
Property Value
| Type | Description |
|---|---|
| TChecked | The selected value of type |
Remarks
This property contains the value of the newly selected radio button in the group.
Examples
private void OnRadioChanged(ChangeArgs<string> args)
{
string selectedValue = args.Value;
}