【发布时间】:2019-11-29 23:46:01
【问题描述】:
我正在尝试在 webgrid 中获取部分状态颜色并将其按百分比划分,但它不适用于某些行
部分状态的webgrid cshtml脚本写在下面。
webGrid.Column(header: "Section Status", format: @
<table class="" cellpadding="5" cellspacing="0" style="width: 100%;">
<tbody>
<tr>
<td id="inProgresswd" width="@item.InProgressPC%" title="@item.InProgressPC%"></td>
<td id="respPendingwd" width="@item.ResponsePendingPC%" title="@item.ResponsePendingPC%"></td>
<td id="revPendingwd" width="@item.ReviewPendingPC%" title="@item.ReviewPendingPC%"></td>
<td id="acceptedwd" width="@item.AcceptedPC%" title="@item.AcceptedPC%"></td>
<td id="rejectedwd" width="@item.RejectedPC%" title="@item.RejectedPC%"></td>
<td id="ftReciverwd" width="@item.FwdToRecieverPC%" title="@item.FwdToRecieverPC%"></td>
</tr>
</tbody>
</table>
, style: "SectionStatus"),
颜色应以 % 方式显示,对于零 %,颜色不应出现在网格中。如图所示,只有 4 种状态颜色应显示为 4 的百分比值为 25。但 5 种颜色显示为突出显示的行
【问题讨论】:
标签: html css asp.net-mvc grid webgrid