title: Radio buttons Knockoutjs
body: <p>I have 2 values that I get from server A and B. I can only have one true at a time.</p>
  
  <p>Again what I need is one of the radios to be checked at a time so one true value only.</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>var viewModel = {
      radioSelectedOptionValue: ko.observable("false"),
      A: ko.observable("false"),
      B: ko.observable("false") 
  };
  ko.applyBindings(viewModel);</code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;script src="https://cdnjs.cloudflare.com/ajax/libs/knockout/2.1.0/knockout-min.js"&gt;&lt;/script&gt;
  &lt;div class='liveExample'&gt;    
          &lt;h3&gt;Radio View model&lt;/h3&gt;
          &lt;table&gt;
          &lt;tr&gt;
              &lt;td class="label"&gt;Radio buttons:&lt;/td&gt;
              &lt;td&gt;
                  &lt;label&gt;&lt;input name="Test" type="radio" value="True" data-bind="checked: A" /&gt;Alpha&lt;/label&gt;
                  &lt;label&gt;&lt;input name="Test" type="radio" value="True" data-bind="checked: B" /&gt;Beta&lt;/label&gt;
              &lt;/td&gt;
          &lt;/tr&gt;
      &lt;/table&gt;  
      A-&lt;span data-bind="text: A"&gt;&lt;/span&gt;
      B-&lt;span data-bind="text: B"&gt;&lt;/span&gt;
  &lt;/div&gt;</code></pre>
  </div>
  </div>
  </p>