title: Knockout not updating view when model is updated when using click binding
body: <p>I'm using knockout 3.0 in an MVC5 application, along with knockout.mapping (v2.4.1) library.</p>
  
  <p>When a button is clicked I want a knockout viewModel property to be updated, and the associated control's values updated as well.</p>
  
  <p>The following is a condensed proof of concept from my larger project that doesn't seem to work properly.</p>
  
  <p>The view:</p>
  
  <pre><code>        &lt;div class="col-md-6"&gt;
          Has College:
          &lt;button data-bind="click: hasCollege"&gt;Yes&lt;/button&gt;
          &lt;button data-bind="click: function () { LevelOfEducation = 'High School'; console.log('Updated LOE: ' + $data.LevelOfEducation) }"&gt;No&lt;/button&gt;
  
          &lt;select data-bind="value: LevelOfEducation" id="LevelOfEducation" name="LevelOfEducation"&gt;
              &lt;option value=""&gt;Please Select&lt;/option&gt;
              &lt;option value="GED"&gt;GED&lt;/option&gt;
              &lt;option value="High School"&gt;High School&lt;/option&gt;
              &lt;option value="0-23 College Credits"&gt;0-23 College Credits&lt;/option&gt;
              &lt;option value="24-47 College Credits"&gt;24-47 College Credits&lt;/option&gt;
              &lt;option value="Associate's Degree"&gt;Associate's Degree&lt;/option&gt;
              &lt;option value="Bachelor's Degree"&gt;Bachelor's Degree&lt;/option&gt;
              &lt;option value="Master's Degree"&gt;Master's Degree&lt;/option&gt;
              &lt;option value="Doctoral Degree"&gt;Doctoral Degree&lt;/option&gt;
          &lt;/select&gt;
          &lt;br /&gt;
          &lt;br /&gt;
          &lt;input type="text" data-bind="value: YearObtainedHSGED" /&gt;
          &lt;select data-bind="value: YearObtainedHSGED" id="YearObtainedHSGED" name="YearObtainedHSGED"&gt;
              &lt;option value=""&gt;Please Select&lt;/option&gt;
              &lt;option value="2014"&gt;2014&lt;/option&gt;
              &lt;option value="2013"&gt;2013&lt;/option&gt;
              &lt;option value="2012"&gt;2012&lt;/option&gt;
              &lt;option value="2011"&gt;2011&lt;/option&gt;
              &lt;option value="2010"&gt;2010&lt;/option&gt;
          &lt;/select&gt;
      &lt;/div&gt;
  </code></pre>
  
  <p>And here's the Javascript:</p>
  
  <pre><code>    // Condensed ViewModel from MVC Controller.
      var model = {
          'LevelOfEducation': 'High School',
          'YearObtainedHSGED': '2011'
      }
      var viewModel = ko.mapping.fromJS(model);
  
      viewModel.hasCollege = function (data, event) {
          console.log("Current LOE: " + ko.unwrap(data.LevelOfEducation));
          viewModel.LevelOfEducation = '0-23 College Credits';
  
          // Also tried:
          // data.LevelOfEducation = '0-23 College Credits';
  
          console.log("Updated LOE: " + viewModel.LevelOfEducation);
          console.log($("#LevelOfEducation").val()) // This value never changes when the buttons are clicked.
      }
  
      ko.applyBindings(viewModel);
  </code></pre>
  
  <p>The first two buttons and the first drop down menu are bound to the viewModel property "LevelOfEducation". When the viewModel property changes knockout SHOULD update the drop down list. The drop downs are pre-populated with values from the razor view model. When "Yes" is clicked, the value should change to the selected option "0-23 College Credits". And when "No" is clicked, it should change the value back to "High School". According to the console logs, the model value is changing, but the control is not updating.</p>
  
  <p>To compare, i have a YearObtainedHSGED-bound textbox and drop down menu. When one value is changed, it updates the other control appropriately.</p>
  
  <p>How do I make the LevelOfEducation drop down update when the Yes/No buttons are clicked?</p>
  
  <p><a href="http://jsfiddle.net/kLv0ht0u/" rel="nofollow" title="JsFiddle">JSFiddle for example</a></p>