This is a migrated thread and some comments may be shown as answers.

Input event needed

1 Answer 172 Views
NumericTextBox
This is a migrated thread and some comments may be shown as answers.
Dan
Top achievements
Rank 1
Iron
Iron
Veteran
Dan asked on 01 Apr 2020, 10:58 AM

I have an application that uses an input for the user to enter a number. When the input is changed another field is recalculated based on the value entered. Because the application is used in different cultures and because the telerik interferes on data binding (see https://www.telerik.com/forums/numeric-input-on-popup-edit-on-different-language) with the decimal separator I have to change the input to a telerik numerictextbox. However the input event does not exist on the numerictextbox.

I tried using numerictextbox_text.on('input keyup', calculate) but they do not work. How can I have the input event on the numerictextbox?

1 Answer, 1 is accepted

Sort by
0
Tsvetomir
Telerik team
answered on 03 Apr 2020, 10:08 AM

Hi Dan,

The editors for the fields of the Kendo UI Grid are created on-demand - whenever the grid enters edit mode. Attaching the input event earlier than within the edit mode itself would not target the correct HTML input. Therefore, within the edit event handler of the grid, attach the input event to the respective editor:

            edit(e){
              $(e.container).find("[data-bind='value:UnitsInStock']")
                .on("input",function(ev){
               // execute custom logic
              })
            }

In case additional assistance is needed, let me know.

 

Regards,
Tsvetomir
Progress Telerik

Progress is here for your business, like always. Read more about the measures we are taking to ensure business continuity and help fight the COVID-19 pandemic.
Our thoughts here at Progress are with those affected by the outbreak.
Tags
NumericTextBox
Asked by
Dan
Top achievements
Rank 1
Iron
Iron
Veteran
Answers by
Tsvetomir
Telerik team
Share this question
or