title: Data Tables set selection on page load
body: <p>Selection is made by use of a check box. When the check box is clicked the row is selected:</p>
  
  <pre><code>    select: {
          style: 'multi',
          selector: ':checkbox'
      }
  </code></pre>
  
  <p>I want to save the selected rows to a database, I do this by use of the ID of the checkboxes checked. When I load the page with checkboxes ticked, I set class of ticked checkboxes to selected:</p>
  
  <pre><code>    $('input:checked').each(function() {
          var $row = $(this).closest('tr');
          $row.addClass('selected');
      });
  </code></pre>
  
  <p>When the page is loaded dataTables does not acknowledge it as selected other than aesthetically. The row is highlighted but when I try to use functions such as the download to excel button, which only downloads selected rows, it does not find any selected rows to download. As if I have only applied the CSS style and not the appropriate functions behind it. When I uncheck a checkbox which was loaded checked, the row does not return to an unselected state, it remains highlighted as if I had just selected it.</p>
  
  <pre><code>            {
                  extend: 'excel',
                  text: 'Download Excel',
                  exportOptions: {
                      columns: [1,2,3,4,5,6,7,8,9,10,11,12,13,14,15],
                      modifier: {
                          selected: true
                      }
                  }
              }
  </code></pre>
  
  <p><strong>How can I load the page with checkboxes ticked and have dataTables recognise it as selected other than aesthetically?</strong></p>
  
  <p>to recreate:
  Click any tickbox to select row, download excel - works
  Click button to reload - it reloads with row selected, click download excel, nothing is downloaded.
  Untick row highlighted, it does not recognise as unselect.</p>
  
  <p><a href="https://jsfiddle.net/mbgfwjh2/3/" rel="nofollow">https://jsfiddle.net/mbgfwjh2/3/</a></p>