title: Dynamically adding rows in a table using dinkToPdf
body: <p>I am generating a report using dinkToPdf in <code>ASP.NetCore MVC</code>. The report is in tabular form as shown below:</p>
  <div class="s-table-container">
  <table class="s-table">
  <thead>
  <tr>
  <th style="text-align: left;">ID</th>
  <th style="text-align: center;">Date</th>
  <th style="text-align: center;">Remark</th>
  <th style="text-align: center;">Column1</th>
  <th style="text-align: center;">Column2</th>
  <th style="text-align: center;">Column3</th>
  <th style="text-align: center;">column4</th>
  </tr>
  </thead>
  <tbody>
  <tr>
  <td style="text-align: left;">01</td>
  <td style="text-align: center;">2/15/22</td>
  <td style="text-align: center;">test</td>
  <td style="text-align: center;">cont</td>
  <td style="text-align: center;">cont</td>
  <td style="text-align: center;">cont</td>
  <td style="text-align: center;">cont</td>
  </tr>
  <tr>
  <td style="text-align: left;">02</td>
  <td style="text-align: center;">2/15/22</td>
  <td style="text-align: center;">test</td>
  <td style="text-align: center;">cont</td>
  <td style="text-align: center;">cont</td>
  <td style="text-align: center;">cont</td>
  <td style="text-align: center;">cont</td>
  </tr>
  <tr>
  <td style="text-align: left;">03</td>
  <td style="text-align: center;">2/15/22</td>
  <td style="text-align: center;">test</td>
  <td style="text-align: center;">cont</td>
  <td style="text-align: center;">cont</td>
  <td style="text-align: center;">cont</td>
  <td style="text-align: center;">cont</td>
  </tr>
  </tbody>
  </table>
  </div>
  <p>Now, on the same <code>ID</code> row there are cases where the row content, the <code>cont</code>, span past <code>column4</code>. Adding more columns to accomodate the <code>cont</code> is not an option, as we only need to display upto <code>column4</code>. Is there a way to dynamically add the additional row contents below their respective <code>ID</code> to achieve something like below?</p>
  <div class="s-table-container">
  <table class="s-table">
  <thead>
  <tr>
  <th style="text-align: left;">ID</th>
  <th style="text-align: center;">Date</th>
  <th style="text-align: center;">Remark</th>
  <th style="text-align: center;">Column1</th>
  <th style="text-align: center;">Column2</th>
  <th style="text-align: center;">Column3</th>
  <th style="text-align: center;">column4</th>
  </tr>
  </thead>
  <tbody>
  <tr>
  <td style="text-align: left;">01</td>
  <td style="text-align: center;">2/15/22</td>
  <td style="text-align: center;">test</td>
  <td style="text-align: center;">cont</td>
  <td style="text-align: center;">cont</td>
  <td style="text-align: center;">cont</td>
  <td style="text-align: center;">cont</td>
  </tr>
  <tr>
  <td style="text-align: left;"></td>
  <td style="text-align: center;"></td>
  <td style="text-align: center;"></td>
  <td style="text-align: center;">cont</td>
  <td style="text-align: center;">cont</td>
  <td style="text-align: center;"></td>
  <td style="text-align: center;"></td>
  </tr>
  <tr>
  <td style="text-align: left;">02</td>
  <td style="text-align: center;">2/15/22</td>
  <td style="text-align: center;">test</td>
  <td style="text-align: center;">cont</td>
  <td style="text-align: center;">cont</td>
  <td style="text-align: center;">cont</td>
  <td style="text-align: center;">cont</td>
  </tr>
  <tr>
  <td style="text-align: left;"></td>
  <td style="text-align: center;"></td>
  <td style="text-align: center;"></td>
  <td style="text-align: center;">cont</td>
  <td style="text-align: center;">cont</td>
  <td style="text-align: center;">cont</td>
  <td style="text-align: center;">cont</td>
  </tr>
  <tr>
  <td style="text-align: left;">03</td>
  <td style="text-align: center;">2/15/22</td>
  <td style="text-align: center;">test</td>
  <td style="text-align: center;">cont</td>
  <td style="text-align: center;">cont</td>
  <td style="text-align: center;">cont</td>
  <td style="text-align: center;">cont</td>
  </tr>
  <tr>
  <td style="text-align: left;">04</td>
  <td style="text-align: center;">2/15/22</td>
  <td style="text-align: center;">test</td>
  <td style="text-align: center;">cont</td>
  <td style="text-align: center;">cont</td>
  <td style="text-align: center;">cont</td>
  <td style="text-align: center;">cont</td>
  </tr>
  </tbody>
  </table>
  </div>
  <p>The method I am using to generate my pdf table is similar to as shown here in this tutorial <a href="https://code-maze.com/create-pdf-dotnetcore/" rel="nofollow noreferrer">https://code-maze.com/create-pdf-dotnetcore/</a> .
  Any suggestions/help is highly appreciated.</p>