Skip to content

Rowspan/Merge Rows ​

Rowspan merges cells that sit on top of each other into one tall cell. With this method, neighboring rows that have the same value in a column are merged automatically, for example a Gender or Category column with repeated values.

Unlike Colspan, there is no #rowspan# keyword. Rowspan uses a short script in Custom JS and the Extra classes column option, both Pro features.

Merge table rows ​

  1. Go to Ninja Tables › Tables › your table › Custom CSS/JS and switch to JavaScript.
  2. Copy the code from this GitHub gist and paste it into the editor.
  3. Click Save.
  4. Open the Table Rows tab. Click the gear icon on the column whose repeated values you want to merge, and choose Column settings.
  5. Open the Advanced tab and type combine in Extra classes.
  6. Click Save column.

Preview the table. Neighboring rows with the same value in that column now share one merged cell. Only neighboring rows are merged, so equal values must sit next to each other.

For the field itself, see Advanced settings.