Change event doesn't fire when it should

7 posts, 0 answers
  1. Phil
    Phil avatar
    30 posts
    Member since:
    Aug 2012

    Posted 03 Jul 2012 Link to this post

    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?
  2. Phil
    Phil avatar
    30 posts
    Member since:
    Aug 2012

    Posted 12 Jul 2012 Link to this post

    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.
  3. Kendo UI is VS 2017 Ready
  4. Jan
    Jan avatar
    3 posts
    Member since:
    Sep 2012

    Posted 17 Oct 2012 Link to this post

    Is there any news on that? I am facing the same bug and it looks like I need the hack described before too...
  5. Georgi Krustev
    Admin
    Georgi Krustev avatar
    3706 posts

    Posted 17 Oct 2012 Link to this post

    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!
  6. Jan
    Jan avatar
    3 posts
    Member since:
    Sep 2012

    Posted 17 Oct 2012 Link to this post

    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
  7. Georgi Krustev
    Admin
    Georgi Krustev avatar
    3706 posts

    Posted 22 Oct 2012 Link to this post

    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!
  8. Marjan
    Marjan avatar
    2 posts
    Member since:
    Sep 2012

    Posted 26 Oct 2012 Link to this post

    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,
Back to Top
Kendo UI is VS 2017 Ready