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

Change event doesn't fire when it should

6 Answers 500 Views
NumericTextBox
This is a migrated thread and some comments may be shown as answers.
Phil
Top achievements
Rank 1
Phil asked on 04 Jul 2012, 12:35 AM
I have a numeric textbox that looks like this:
@(Html.Kendo().NumericTextBoxFor(m => m.Location.Latitude).Decimals(8).Min(-90).Max(90).Step(.01).Format("{0:0.########}").Events(events => events.Change("placeMarker")))
Every time someone hits the up/down arrow in the numerictextbox, i want the change event (placeMarker) to run.  But it only runs after the person has clicked outside of the numerictextbox, i.e. it loses focus.  Is there a way around this?

6 Answers, 1 is accepted

Sort by
0
Phil
Top achievements
Rank 1
answered on 12 Jul 2012, 06:33 PM
This is still the case as of 2012.2.710 release, although there is an event called 'Spin' that i can use to do what i need it seems.  I need to use both events to call the same function in order to get what i want.
0
Jan
Top achievements
Rank 1
answered on 17 Oct 2012, 03:09 PM
Is there any news on that? I am facing the same bug and it looks like I need the hack described before too...
0
Georgi Krustev
Telerik team
answered on 17 Oct 2012, 04:02 PM
Hello,

 
By design the change event of the input widget is raised when the input element looses focus. The change event of the INPUT element has the same behavior. If you need to get value when up/down arrow is clicked use the spin event.

Regards,
Georgi Krustev
the Telerik team
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
0
Jan
Top achievements
Rank 1
answered on 17 Oct 2012, 06:23 PM
Hi Georgi,

thanks for the info. Yet I do use the numeric text box along with a template and a list view. Can you give me a hint on how to store the value back in the model when the spin event is triggered? E.g. is there a way to bind to this event?

Thanks,
Jan
0
Georgi Krustev
Telerik team
answered on 22 Oct 2012, 08:14 AM
Hello Jan,

 
You can handle the edit event of the ListView and bind the spin event of the numerictextbox there. When the spin event raises you can get the value and update the model.

Regards,
Georgi Krustev
the Telerik team
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
0
Marjan
Top achievements
Rank 1
answered on 26 Oct 2012, 08:04 AM
Hi,

Can you give some example of that?
Because, really, it's quite annoying.
In my case, I'm using kendo mobile listview with complex template and I need to automatically save data ether or blur or change event. How I'm suppose to achieve that?

Regards,
Tags
NumericTextBox
Asked by
Phil
Top achievements
Rank 1
Answers by
Phil
Top achievements
Rank 1
Jan
Top achievements
Rank 1
Georgi Krustev
Telerik team
Marjan
Top achievements
Rank 1
Share this question
or