Binding: update view-model onchange instead of onblur for html input tag

8 posts, 1 answers
  1. Luc
    Luc avatar
    42 posts
    Member since:
    Jul 2012

    Posted 29 Feb 2012 Link to this post

    Hi,

    Just looking at the beta MVVM stuff, and wondering if it's possible set the update mode to onchange instead of onblur for input tags.

    Thanks

    EDIT: I just found the following in the docs (I was actually looking for BETA docs, but realized the MVVM stuff is documented in the "regular" docs):

    The value binding relies on the change DOM event which is raised after blurring an input element whose value has changed. This means that the value from the View-Model will be updated when the input element loses focus.

    Is there any chance of seeing this changed in final release to rely on HTML events as well as DOM events ? Having the underlying View-Model update as the user types text is required in some scenarios.
  2. Luc
    Luc avatar
    42 posts
    Member since:
    Jul 2012

    Posted 01 Mar 2012 Link to this post

    My first post is somehow misleading, and it's mostly due to my lack of understanding of the event model when working with HTML.

    What I meant by relying on HTML events is not correct, so please disregard this.

    What I really meant was that it would be nice to have a "valueUpdate" parameter to the value binding that would allow us to specify WHEN then actual update to the View-Model occurs.

    This would allow us to specify, for example, "keyup" to update the View-Model after the user releases a key instead of when the focus is lost.

    Thank you
  3. Kendo UI is VS 2017 Ready
  4. Luc
    Luc avatar
    42 posts
    Member since:
    Jul 2012

    Posted 03 Mar 2012 Link to this post

    I'm a bit surprised not to see any reply from Telerik/KendoUI team members on this.

    Isn't the point of releasing BETA software to gather comments from users and discuss the issues ?

    I'm pointing out the fact that the MVVM data binding version of KendoUI, so far, doesn't allow for "real time" update to the underlying model.

    On the other hand, KnockoutJS does provide this functionality.

    I'm asking if this will make it into your product or not.

    Am I expecting too much by expecting a reply ?

    Thank you.
  5. Answer
    Atanas Korchev
    Admin
    Atanas Korchev avatar
    8462 posts

    Posted 05 Mar 2012 Link to this post

    Hello,

    Kendo MVVM will add support for real-time updating of the View-Model in the official version.

    Regards,
    Atanas Korchev
    the Telerik team
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
  6. Luc
    Luc avatar
    42 posts
    Member since:
    Jul 2012

    Posted 22 Mar 2012 Link to this post

    Hi,

    Has this been implemented in Q1 2012 ?

    Thank you
  7. Luc
    Luc avatar
    42 posts
    Member since:
    Jul 2012

    Posted 22 Mar 2012 Link to this post

    Ok,

    I had to look at the KendoUI binding code to find out how this works, as the docs are not updated yet:

    <input data-bind="value: inputValue" data-value-Update="keyup" />
  8. Malcolm
    Malcolm avatar
    2 posts
    Member since:
    Jun 2012

    Posted 04 Apr 2012 Link to this post

    Thanks Luc, this has been driving me mad since moving from knockout. The documentation for MVVM and data-* binding needs some serious TLC.

    Cheers
    John
  9. Purna
    Purna avatar
    17 posts
    Member since:
    May 2012

    Posted 29 Dec 2015 Link to this post

    I'm trying to build a password strength meter using Kendo ProgressBar widget and a data bound input field. I need the model to be updated onchange instead of onblur.

     

     Is it possible to change this default behavior? It's possible to do this as shown in this demo, but I want it to work with data binding.

     Could you point me to the right documentation? 

Back to Top
Kendo UI is VS 2017 Ready