title: fnUpdate the multi td for th with colspan
body: <p>I use <code>.fnUpdate()</code> to generate <code>table</code> according to data that comes from the database.
  <a href="http://legacy.datatables.net/ref" rel="nofollow noreferrer">http://legacy.datatables.net/ref</a></p>
  
  <p>I have some teacher in the header of the <code>table</code>, and some information in the <code>td</code> in the body of the <code>table</code>.</p>
  
  <p>I can generate the data in <code>TDs</code> but I want to show the multiple <code>td</code> bellow one <code>th</code>.</p>
  
  <h3>Problem</h3>
  
  <p>I can set the <code>colspan</code> for generated <code>th</code>, but how I can assign data by fnupdate for each sub td.
  <strong>Note: the number of teachers and the number of colspan will assign from DB and we should dynamically check the number of colspan and generate related td's.</strong></p>
  
  <p>I want to generate output like this by <code>fnUpdate</code>
  <a href="https://i.stack.imgur.com/3zcXd.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/3zcXd.png" alt="enter image description here"></a></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-html lang-html prettyprint-override"><code>&lt;script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js"&gt;&lt;/script&gt;
      &lt;script src="http://code.jquery.com/jquery-1.11.3.min.js"&gt;&lt;/script&gt;
  
      &lt;link href="https://nightly.datatables.net/css/jquery.dataTables.css" rel="stylesheet" type="text/css" /&gt;
      &lt;script src="https://nightly.datatables.net/js/jquery.dataTables.js"&gt;&lt;/script&gt;
  
      &lt;meta charset=utf-8 /&gt;
      &lt;title&gt;DataTables - JS Bin&lt;/title&gt;
    &lt;body&gt;
      &lt;div class="container"&gt;
        &lt;table id="example" class="display nowrap" border='1'&gt;
          &lt;thead&gt;
            &lt;tr&gt;
              &lt;th colspan="2"&gt;teacher 1&lt;/th&gt;
              &lt;th&gt;teacher 2&lt;/th&gt;
              &lt;th&gt;teacher 3&lt;/th&gt;
              &lt;th colspan="3"&gt;teacher 2&lt;/th&gt;
              &lt;th&gt;teacher 5&lt;/th&gt;
              &lt;th&gt;teacher 6&lt;/th&gt;
            &lt;/tr&gt;
          &lt;/thead&gt;
  
          &lt;tbody&gt;
            &lt;tr&gt;
              &lt;td&gt;Tiger Nixon&lt;/td&gt;
              &lt;td&gt;Tiger Nixon2&lt;/td&gt;
              &lt;td&gt;System Architect&lt;/td&gt;
              &lt;td&gt;Edinburgh&lt;/td&gt;
              &lt;td&gt;Edinburgh61&lt;/td&gt;
              &lt;td&gt;Edinburgh62&lt;/td&gt;
              &lt;td&gt;Edinburgh63&lt;/td&gt;
              &lt;td&gt;2011/04/25&lt;/td&gt;
              &lt;td&gt;Edinburgh3,120&lt;/td&gt;
            &lt;/tr&gt;
          &lt;/tbody&gt;
        &lt;/table&gt;
      &lt;/div&gt;
    &lt;/body&gt;</code></pre>
  </div>
  </div>
  </p>