title: Knockout checkedValue Binding not showing checked
body: <p>I am trying get a list of checkboxes get checked based on two observablearrays.  The first one has a few programids and the second one will have all the records of programids.  Both the observablearray's data come from the database.</p>
  
  <p>Basically I am trying to get the list of programid already assigned for a user which is in ProgramIDs array and compare it with the array of AllPartnerPrograms array and show the ones that match as checked.</p>
  
  <p>Then I want to be able to check from the new list and send it back to the server to update the user's data with the new list of programid.</p>
  
  <p>I am not sure why the checkedValue binding is not work or I do not understand how to make it work.  I created a <a href="http://jsfiddle.net/adriandcosta/ekb85ftg/2/" rel="nofollow">fiddle</a> with the same code here. </p>
  
  <p>I am assuming that <code>$root.AllPartnerPrograms</code> will get show the checked items based on the <code>self.ProgramIDs</code> array but that does not happen.</p>
  
  <p>If I put the code like this, it gets checked but does not show me the other records.</p>
  
  <pre><code> &lt;input type="checkbox" data-bind="checkedValue: ProgramID, checked: ProgramID" /&gt;  
  </code></pre>
  
  <p>If I change the foreach to <code>&lt;!-- ko foreach: AllPartnerPrograms --&gt;</code> then I get the other records but still not check based on the first list.</p>
  
  <p>What am I doing wrong here?</p>
  
  <p><strong>My code</strong></p>
  
  <pre><code>&lt;div id="programs"&gt;
  &lt;!-- ko foreach: ProgramIDs --&gt;    
  &lt;input type="checkbox" data-bind="checkedValue: ProgramID, checked: $root.AllPartnerPrograms" /&gt;    
  &lt;span data-bind="text: ProgramName"&gt;&lt;/span&gt;
  &lt;!-- /ko --&gt;
  </code></pre>
  
  <p></p>
  
  <p><strong>View Model</strong></p>
  
  <pre><code>var objPartnerPrograms;
  vmPartnerProgramsModel = function () {
  var self = this;
  
  self.ProgramIDs = ko.observableArray(
  [{ProgramID: 16002,ProgramName: "Program1"}, 
   {ProgramID: 16003,ProgramName: "Program2"}, 
   {ProgramID: 16005,ProgramName: "Program3"}, 
   {ProgramID: 16006,ProgramName: "Program4"}, 
   {ProgramID: 16011,ProgramName: "Program5"
  }]);
  
  self.AllPartnerPrograms = ko.observableArray(
  [{ProgramID: 16002,ProgramName: "Program1"}, 
   {ProgramID: 16003,ProgramName: "Program2"}, 
   {ProgramID: 16005,ProgramName: "Program3"}, 
   {ProgramID: 16006,ProgramName: "Program4"}, 
   {ProgramID: 16011,ProgramName: "Program5"}, 
   {ProgramID: 16102,ProgramName: "Program6"}, 
   {ProgramID: 16104,ProgramName: "Program7"
   }]);
  };
  
  $(document).ready(function () {
    objPartnerPrograms = new vmPartnerProgramsModel()
    ko.applyBindings(objPartnerPrograms, $("#programs")[0]);
  });
  </code></pre>