New to Telerik UI for ASP.NET Core? Start a free 30-day trial
Events
The Telerik UI for ASP.NET Core RadioGroup exposes multiple events that allow you to control and customize the behavior of the UI component.
For a complete example on basic RadioGroup events, refer to the demo on using the events of the RadioGroup.
Handling by Handler Name
The following example demonstrates how to subscribe to events by handler name.
Razor
@(Html.Kendo().RadioGroup()
.Name("radiogroup")
.Items(i =>
{
i.Add().Label("Two bedroom apartment for multiple people").Value("1");
i.Add().Label("Studio apartment with kitchen").Value("2");
i.Add().Label("Double bed apartment with kids zone").Value("3");
})
.Value("2")
.Events(e => e.Change("onChange"))
)
Handling by Template Delegate
The following example demonstrates how to subscribe to events by using a template delegate.
Razor
@(Html.Kendo().RadioGroup()
.Name("radiogroup")
.Events(e => e
.Change(@<text>
function() {
// Handle the change event inline.
}
</text>)
)
)