Events
You can subscribe to the Change
and Spin
NumericTextBox events and further customize the functionality of the component.
For a complete example on basic NumericTextBox events, refer to the demo on using the events of the NumericTextBox.
Handling by Handler Name
The following example demonstrates how to subscribe to events by a handler name.
@(Html.Kendo().NumericTextBox()
.Name("numerictextbox")
.Events(e => e
.Change("numerictextbox_change")
.Spin("numerictextbox_spin")
)
)
<kendo-numerictextbox name="numerictextbox"
on-change="numerictextbox_change"
on-spin="numerictextbox_spin">
</kendo-numerictextbox>
<script>
function numerictextbox_spin() {
// Handle the spin event.
}
function numerictextbox_change() {
// Handle the change event.
}
</script>
Handling by Template Delegate
The following example demonstrates how to subscribe to events by a template delegate.
@(Html.Kendo().NumericTextBox()
.Name("numerictextbox")
.Events(e => e
.Change(@<text>
function() {
// Handle the change event inline.
}
</text>)
.Spin(@<text>
function() {
// Handle the spin event inline.
}
</text>)
)
)