Events
You can subscribe to all Rating events and then use them to further customize the behavior of the component.
For a complete example on basic Rating events, refer to the demo on using the events of the Rating.
Handling by Handler Name
The following example demonstrates how to subscribe to events by a handler name.
@(Html.Kendo().Rating()
.Name("rating")
.Events(e => {
e.Change("onChange");
e.Select("onSelect");
})
)
<script>
function onChange(e) {
// Handle the change event.
}
function onSelect(e) {
// Handle the complete event.
}
</script>
Handling by Template Delegate
The following example demonstrates how to subscribe to events by a template delegate.
@(Html.Kendo().Rating()
.Name("rating")
.Events(e => e.Change(@<text>
function() {
// Handle the change event.
}
</text>)
)
)