I need the html table for the following table structure.
This is something similar I have tried till now: (this is a .cshtml view, which takes a model as input)
<table>
<tbody>
<tr>
<th>Code Number of Equipment</th>
<th>Name of Equipment</th>
<th>Brand</th>
<th>Model</th>
<th>Quantity</th>
<th>Check Item</th>
<th>Note</th>
<th>Quoted Price</th>
</tr>
@foreach (var equipment in Model.Equipments)
{
<tr>
<td>@equipment.Code</td>
<td>@equipment.Name</td>
<td>@equipment.EquipmentBrand</td>
<td>@equipment.EquipmentModel</td>
<td>@String.Format("{0:n0}", equipment.Quantity)</td>
<td colspan="2">
<table >
<tbody >
@foreach (var item in equipment.EligibilityChecksheets)
{
<tr>
<td>@item.CheckListItem</td>
<td>@item.Note</td>
</tr>
}
</tbody>
</table>
</td>
<td>@String.Format("{0:n0}", Model.Currency + " " + equipment.UnitPrice)</td>
</tr>
}
<tr>
<th></th>
<th></th>
<th></th>
<th></th>
<th></th>
<th>Total : </th>
<th>@String.Format("{0:n0}", Model.Currency + " " + Model.TotalPrice)</th>
</tr>
</tbody>
</table>
The problem with this code is - there is a gap between <td>
and the inner table. I want to do this work using rowspan
- is it possible to do it for this scenario?