Events
The Telerik UI Slider for ASP.NET Core exposes Change
and Slide
events that allow you to control the behavior of the UI component.
For a complete example, refer to the demo on using the Slider events.
Handling by Handler Name
The following example demonstrates how to subscribe to events by a handler name.
@(Html.Kendo().Slider()
.Name("slider")
.Events(e => e
.Change("change")
.Slide("slide")
)
)
<script>
function change(e) {
// Handle the change event.
}
function slide(e) {
// Handle the slide event.
}
</script>
<kendo-slider name="slider"
on-change="change"
on-slide="slide"
</kendo-slider>
<script>
function change(e) {
// Handle the change event.
}
function slide(e) {
// Handle the slide event.
}
</script>
Handling by Template Delegate
The following example demonstrates how to subscribe to events by a template delegate.
@(Html.Kendo().Slider()
.Name("slider")
.Events(e => e
.Change(@<text>
function(e) {
// Handle the change event inline.
}
</text>)
.Slide(@<text>
function(e) {
// Handle the slide event inline.
}
</text>)
)
)
<kendo-slider name="slider"
on-change="function() {
// Handle the change event inline.
}"
on-slide="function() {
// Handle the slide event inline.
}">
</kendo-slider>