title: How to dynamically change HTML.CheckBoxFor using Jquery
body: <p>Hi Guys I have a problem, I have 3rows with users, and each row has 5 checkbox(Html.CheckBoxFor) these checkboxes are for assigning rights to these users.My problem is that when CheckBox 2 for row 1 is unchecked CheckBox 1 for row 1 should also be unchecked.But this is not happening, instead of unchecking just row 1, the whole colum for check box 1 is unchecked. Here is my Jquery function. </p>
  
  <pre><code>function setRights() {
  var personalReport = document.getElementById("personalReports");
  alert(personalReport.value);
  personalReport.addEventListener('change', function () {
      if (personalReport.value) {
          $($("form #viewAllReports").attr('checked', false));
      }
      else {
      }
  });
  } 
  </code></pre>
  
  <p>"personalReports" and #viewAllReports"  are Ids I gave to my Html.CheckboxFor(s).
  and this does work but not in the way I want too, and I guess  what Im asking for here is, a way to uniquely identify all these row in a way that I can specify it in jquery to get the desired results thats going to affect just the row im busy with. Thanks in advance.</p>
  
  <p>Here is my view code:</p>
  
  <pre><code>    &lt;div class="chkbox"&gt;                            
          @Html.CheckBoxFor(m =&gt; m.PersonalReports, new { id = "personalReports", onclick   = "setRights();" })
      &lt;/div&gt;
      &lt;div class="chkbox"&gt;                            
          @Html.CheckBoxFor(m =&gt; m.ViewAllReports, new { id = "viewAllReports"})
      &lt;/div&gt;
      &lt;div class="chkbox"&gt;                            
          @Html.CheckBoxFor(m =&gt; m.EditAI)
      &lt;/div&gt;
      &lt;div class="chkbox"&gt;                            
          @Html.CheckBoxFor(m =&gt; m.ReportBranding)
      &lt;/div&gt;
      &lt;div class="chkbox"&gt;                            
          @Html.CheckBoxFor(m =&gt; m.PersonalizeTheme)
      &lt;/div&gt;
      &lt;div class="chkbox"&gt;
      @Html.CheckBoxFor(m =&gt; m.Search)
      &lt;/div&gt;
      &lt;div class="chkbox"&gt;
      @Html.CheckBoxFor(m =&gt; m.RequestOutOfBundleSearch)
      &lt;/div&gt;
  </code></pre>