New to Telerik UI for Blazor? Download free 30-day trial

Events

This article explains the events available in the Telerik Rating for Blazor:

  • ValueChanged - fires when the user selects an item (icon).

ValueChanged

The ValueChanged event fires when the user clicks an item or uses the keyboard to select it.

Make sure to update the currently selected item when using the event.

Handle ValueChanged

<TelerikRating Value="@Value"
               ValueChanged="@((double newRating) => ValueChangedHandler(newRating))">
</TelerikRating>

@code {
    private double Value { get; set; } = 1;

    private void ValueChangedHandler(double newRating)
    {
        Value = newRating;
    }
}

The event is an EventCallback. It can be synchronous and return void, or asynchronous and return async Task. Do not use async void.

See Also

In this article