MVVM biding for KendoSlider

2 posts, 1 answers
  1. Dr.YSG
    Dr.YSG avatar
    213 posts
    Member since:
    Dec 2009

    Posted 03 May 2013 Link to this post

    I have a kendoObservable (numeric value) that is bound both to a span (text: ) and a kendo slider (value:)

    I have a button that increments the value. But only the text version is updating. What did I do wrong?

    An example is worth a thousand words:

    One wrinkle here is that i need to dynamically add the slider. So there is a button at the top that you have to hit first, to add the slider to the DOM. Then just press the [increment] button to see what is going on.

    (do I have to rebind the VM, after adding the slider?).
  2. Answer
    Holger avatar
    78 posts
    Member since:
    Nov 2012

    Posted 05 May 2013 Link to this post

    Yes, you will have to re-bind the viewmodel. A repetitive call to Kendo.bind will first unbind and then bind the specified DOM elements.

    Please check your modified sample here:
Back to Top