I have 2 fields quantity and price. I basically want to multiply them together and get a value for another column called Price (Which is the total of the multiplication).
I have tried using the below html code:
@Html.DisplayFor(modelItem => item.item_order_quantity*item.ITEM.item_price)
This is my Table row code:
<table class="table table-striped table-advance table-hover">
<tbody>
<tr>
<th><i class="icon_pin_alt"></i> Item Description</th>
<th><i class="icon_pin_alt"></i> Quantity</th>
<th><i class="icon_calendar"></i> Price</th>
</tr>
@foreach (var item in Model.ITEM_ORDER)
{
<tr>
<td style="width:auto">
@Html.DisplayFor(modelItem => item.ITEM.item_description)
</td>
<td style="width:auto">
@Html.DisplayFor(modelItem => item.item_order_quantity)
</td>
<td style="width:auto">
@Html.DisplayFor(modelItem => item.item_order_quantity*item.ITEM.item_price)
</td>
<td>
<div class="btn-group">
@Html.ActionLink("View", "Details", new { id = item.OrderID }) |
@Html.ActionLink("Edit", "Edit", new { id = item.OrderID }) |
@Html.ActionLink("Delete", "Delete", new { id = item.OrderID })
</div>
</td>
</tr>
}
</tbody>
</table>