title: jQuery datatable clears radio button in header
body: <p>I have a jQuery Datatable with 3 headers. One header contains two radio buttons, another header contains a select box. By default, one of the options is checked. </p>
  
  <p>When I use the search function in the Datatable to search for specific records, it does not display which radio button was checked. I inspected the DOM after I used the datatable search, and the input element still contains the CHECKED attribute. The select box is not affected. It still retains the value of the select box.</p>
  
  <p>Also, IE behaves fine. O_o FF and Chrome are not recognizing the checked value.</p>
  
  <p>I tried a <code>$(selector).datatable().fnDraw();</code>... no dice.</p>
  
  <p>How do I get the datatable to recognize the checked attribute after, or during, the search? Has anyone experienced something similar?</p>
  
  <p>Any help is appreciated. Thanks.</p>
  
  <p>Edit: After further investigation, it looks like the fnDraw is clearing the value of the radio button.</p>
  
  <p><strong>Code</strong></p>
  
  <p>Initialize datatable <strong>(Javascript)</strong></p>
  
  <pre><code>$.get('store_handler.ashx', { cmd: '9', pubId: pubId, sub: sub }, function(o) {
      $("#researchTableDiv").html(o.datatableContent);
  
      $('#ResearchTable').dataTable({
          "bJQueryUI": true,
          "bPaginate": false,
          "sScrollY": "450px",
          "bSort": false
      });
  
      if (o.radioCheck == "single")
          $('#radioSingle').attr("checked", "checked");
      else
          $('#radioSub').attr("checked", "checked");
  
  }, "json");
  </code></pre>
  
  <p>HTML of datatable headers <strong>(C# .Net)</strong></p>
  
  <pre><code>    htmlString.Append("&lt;thead&gt;");
      htmlString.Append("&lt;tr&gt;");
      htmlString.Append("&lt;th valign=\"middle\" style=\"width: 200px; text-align: left;valign:top;border-right:0px;padding-bottom:0px\" class=\"header\"&gt;Filter:&amp;nbsp;");
      htmlString.Append("&lt;select name=\"nonSort2\" style=\"height:20px;padding:0px;margin-top:-0px;font-size:11px\"&gt;");
      htmlString.Append("&lt;option value=\"AKLPH\"&gt;All&lt;/option&gt;");
      htmlString.Append("&lt;option value=\"-\"&gt;---------------&lt;/option&gt;");
      htmlString.Append("&lt;option value=\"AK\"&gt;Alaska&lt;/option&gt;");
      htmlString.Append("&lt;option value=\"AL\"&gt;Etc...&lt;/option&gt;");
      htmlString.Append("&lt;/select&gt;");
      htmlString.Append("&lt;/th&gt;");
      htmlString.Append("&lt;th align=\"left\" class=\"header\" &gt;");
      if (sub == "0")
      {
          htmlString.Append("&lt;input type=\"radio\" value=\"0\" name=\"rdoSubscription\" id=\"radioSingle\" checked=\"CHECKED\" style=\"margin-left:1px\"/&gt;Single Report");
          htmlString.Append("&lt;input type=\"radio\" value=\"1\" name=\"rdoSubscription\" id=\"radioSub\" onclick=\"getPubDetails('" + pubId + "','1');\" style=\"margin-left:1px\"/&gt;Subscription");
          jOut.Put("radioCheck", "single");
      }
      else
      {
          htmlString.Append("&lt;input type=\"radio\" value=\"0\" name=\"rdoSubscription\" id=\"radioSingle\" onclick=\"getPubDetails('" + pubId + "','0');\" style=\"margin-left:1px\"/&gt;Single Report");
          htmlString.Append("&lt;input type=\"radio\" value=\"1\" name=\"rdoSubscription\" id=\"radioSub\" checked=\"CHECKED\" style=\"margin-left:1px\"/&gt;Subscription");
          jOut.Put("radioCheck", "sub");
      }
      htmlString.Append("&lt;/th&gt;");
      htmlString.Append("&lt;th class=\"header\" align=\"center\"&gt;Action&lt;/th&gt;");
      htmlString.Append("&lt;/tr&gt;");
      htmlString.Append("&lt;/thead&gt;");
  </code></pre>