Class ChangeArgs<TChecked>
Provides event data for radio button value changes in the Syncfusion Blazor Buttons library.
Inheritance
Namespace: Syncfusion.Blazor.Buttons
Assembly: Syncfusion.Blazor.dll
Syntax
public class ChangeArgs<TChecked> : Object
Type Parameters
Name |
---|
TChecked |
Remarks
This class is used to convey information when the value of a RadioButton component has changed. It includes the new value, as well as the basic event parameters related to the change.
Examples
The following example demonstrates usage of the ChangeArgs<TChecked> class with a RadioButton:
<SfRadioButton TValue="string" @bind-Value="selectedValue" ValueChange="OnRadioChanged" />
@code {
private string selectedValue;
private void OnRadioChanged(ChangeArgs<string> args)
{
// Access the new value
string val = args.Value;
// Access event arguments
var evt = args.Event;
}
}
Constructors
ChangeArgs()
Declaration
public ChangeArgs()
Properties
Event
Gets or sets the event parameters related to the RadioButton value change event.
Declaration
public EventArgs Event { get; set; }
Property Value
Type | Description |
---|---|
System.EventArgs | An System.EventArgs object containing information about the event. Typically used for additional event context. |
Remarks
This property holds the basic event arguments associated with the radio button's value change. It may not include mouse-specific information; use with caution if you need details about user interaction context.
Examples
void OnRadioChanged(ChangeArgs<string> args)
{
var evt = args.Event;
}
Value
Gets or sets the value of the RadioButton after a change event has occurred.
Declaration
public TChecked Value { get; set; }
Property Value
Type | Description |
---|---|
TChecked | The new selected value of type |
Remarks
This property provides the current value of the radio button group after the user has made a selection.
Examples
void OnRadioChanged(ChangeArgs<string> args)
{
string val = args.Value;
}