OnChange Event

1 Answer 1377 Views
TextBox
Bob
Top achievements
Rank 1
Iron
Veteran
Iron
Bob asked on 09 Sep 2021, 08:22 PM

Is there any way to have the OnChange event get called when they click enter but NOT when the textbox loses focus?

My textbox is in a modal and it performs a data search when Enter is clicked in the textbox, but the problem is when I click the Cancel button in my modal window it fires the event if I am still focussed on the textbox and it interferes with the closing of the modal.

 

1 Answer, 1 is accepted

Sort by
0
Marin Bratanov
Telerik team
answered on 09 Sep 2021, 09:17 PM

Hello Bob,

You can capture the Enter key as shown here: https://docs.telerik.com/blazor-ui/knowledge-base/inputs-handle-keyboard-events

Regards,
Marin Bratanov
Progress Telerik

Virtual Classroom, the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products quickly just got a fresh new look + new and improved content including a brand new Blazor course! Check it out at https://learn.telerik.com/.

Tags
TextBox
Asked by
Bob
Top achievements
Rank 1
Iron
Veteran
Iron
Answers by
Marin Bratanov
Telerik team
Share this question
or