Ich brauche etwas Hilfe mit dynamischen HTML-Tabellen.dynamische Tabelle colspan Spalte mit 2 statischen Spalten
Was ich erreichen möchte, ist etw. dies wie:
+----------+-------------+--------------+-----+
| Column1 | dynamic col | dynamic col2 | etc |
| |-------------+--------------+-----+
| rowspan2 | col3 | col4 | col3 | col4 | etc |
+----------+------+------+------+-------+-----+
Ich habe bereits versucht, einige Dinge, aber meine einzige Lösung sieht wie folgt aus:
<table class="table table-striped table-bordered table-hover">
<thead>
<tr>
<th rowspan="2">Column1</th>
<th colspan="2" *ngFor="let col of columns">dynamic col</th>
</tr>
<tr>
<th colspan="2" *ngFor="let col of columns" >
<div style="display: inline-block">col3</div>
<div style="display: inline-block">col4</div>
</th>
</tr>
</thead>
<tbody>
</tbody>
</table>
Und dann rund um die 2 divs zu bauen versucht, ... gibt es eine bessere Lösung? Vielen Dank im Voraus!
Das 1 würde funktionieren, wenn ich wirklich hatte ein Array mit den statischen Spaltennamen. Danke, ich werde das tun! :) – tstellfe