Events
This article explains the events available in the Telerik RadioGroup for Blazor:
The examples in this article use string values and simple data sources for brevity. You can use full models, see the data binding article for more details.
OnChange
The OnChange event represents a user action - confirmation of the current value. In inputs, it fires when the user presses Enter in the input, or when the input loses focus. In the RadioGroup, it fires when the user selects an item because there is no other action.
The
OnChangeevent is a custom event and does not interfere with bindings, so you can use it together with models and forms.
Handle the OnChange event and use two-way binding
The event is an
EventCallback. It can be synchronous and returnvoid, or asynchronous and returnasync Task. Do not useasync void.
ValueChanged
The ValueChanged event fires upon every change of the user selection.
The example below uses binding to string data for brevity. You can use a model class as well.
Handle ValueChanged
The event is an
EventCallback. It can be synchronous and returnvoid, or asynchronous and returnasync Task. Do not useasync void.
The lambda expression in the handler is required by the framework: https://github.com/aspnet/AspNetCore/issues/12226.
OnBlur
The OnBlur event fires when an element inside the component loses focus (radio button or the entire component).
Handle the OnBlur event