# Events

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

* [OnBlur](https://www.telerik.com/blazor-ui/documentation/components/numerictextbox/events#onblur)
* [OnChange](https://www.telerik.com/blazor-ui/documentation/components/numerictextbox/events#onchange)
* [ValueChanged](https://www.telerik.com/blazor-ui/documentation/components/numerictextbox/events#valuechanged)

## OnBlur

The `OnBlur` event fires when the component loses focus.

> caption Handle the OnBlur event

<demo metaUrl="client/numerictextbox/events/on-blur/" height="220"></demo>

## OnChange

The `OnChange` event represents a user action that confirms the current value. It fires when the user presses `Enter` in the input or when the input loses focus.

The event handler receives an `object` argument that you need to cast to the actual `Value` type. The argument can hold a value or be `null`, depending on the user input and the `Value` type.

The NumericTextBox is a generic component, so you must either provide a `Value`, or a type to the `T` parameter of the component.

> caption Handle OnChange and use two-way binding

<demo metaUrl="client/numerictextbox/events/on-change/" height="250"></demo>

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

> tip The `OnChange` event is a custom event and does not interfere with bindings, so you can use it together with models and forms.

## ValueChanged

The `ValueChanged` event fires during typing.

The event handler argument can hold a value or be `null`, depending on the user input and the `Value` type.

Using this event requires one-way binding for the `Value` parameter and manual updating of the value in the handler. If the value is not updated, this will effectively cancel the event.

> caption Handle ValueChanged

<demo metaUrl="client/numerictextbox/events/value-changed/" height="250"></demo>

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

> note The lambda expression in the handler is required by the framework: <https://github.com/aspnet/AspNetCore/issues/12226>.

## See Also

* [ValueChanged and Validation](https://www.telerik.com/blazor-ui/documentation/knowledge-base/value-changed-validation-model)
* [Fire OnChange Only Once](https://www.telerik.com/blazor-ui/documentation/knowledge-base/common-onchange-fires-twice)
