Value Changed in ViewModel not Reflected in View

2 posts, 0 answers
  1. Paul
    Paul avatar
    3 posts
    Member since:
    May 2013

    Posted 05 Feb 2014 Link to this post

    I have a very simple example setup where I want to change a viewmodel value inside a function using click binding. It looks like the viewmodel value is getting changed but the view is never updated.

    Here is the example:

    http://jsfiddle.net/MuFP5/2/
  2. Paul
    Paul avatar
    3 posts
    Member since:
    May 2013

    Posted 05 Feb 2014 in reply to Paul Link to this post

    I figured out what was wrong. When changing a viewModel value in the event, I have to use "set" instead of just setting the value equal to the new value. 

    I had to do this:

    this.set("slideVisible", !this.slideVisible);

    instead of:

    this.slideVisible = !this.slideVisible;
  3. Kendo UI is VS 2017 Ready
Back to Top