How to leave field with values in bold
Situation I have a table made in html called payments and in it I have a column called values, I want to leave the fields with values in bold.
Problem: has employee who had value to be paid and others do not. How do I leave only fields with values greater than 0 in bold?
Ideal scenario: Leave Only fields with values greater than 0 in bold.
HTML:
<table id="data-table-default" class="table table-striped table-bordered">
<thead>
<tr>
<th class="col-xs-1 text-center">
@Html.DisplayNameFor(model => model.Salario1)
</th>
<th class="col-xs-1 text-center">
@Html.DisplayNameFor(model => model.Salario2)
</th>
<th class="col-xs-1 text-center">
@Html.DisplayNameFor(model => model.Salario3)
</th>
</tr>
</thead>
<tbody>
@foreach (var item in Model)
{
<tr>
<td class="text-center">
@Html.DisplayFor(a => item.Salario1)
</td>
<td class="text-center">
@Html.DisplayFor(a => item.Salario2)
</td>
<td class="text-center">
@Html.DisplayFor(a => item.Salario3)
</td>
</tr>
}
</tbody>
</table>
1
Author: Thiago Correa, 2019-08-03
1 answers
@ Thiago Correa,in case the condition has to be restricted to the field, there would be no way to do a single check to scroll through the table, because the condition is exclusive to the "field".
A IF
has to be made for each field.
Through javascript (jQuery) you would be able to solve, but it is not within the scope of the question.
0
Author: Demetrius Pecoraro, 2019-10-01 20:23:12