Currently I have an error to edit the detail of an order, I want to pass the field iCode which is the code of the detail, but with this code I have the error that passes the code of the header of the order.
In my view the detail is as follows:
<tbody style="background-color:#f1f8f8" data-bind="foreach: items">
<tr>
<td data-bind="text: iCode"></td>
<td data-bind="text: strName"></td>
<td data-bind="text: iQuantity"></td>
<td><a href="#" @{ if (Model.iShow > 0)
{ <text> style="visibility:hidden" </text> } } data-bind="click: $parent.EditDetalle">
<i class="glyphicon glyphicon-pencil"></i>
</a>
</td>
</tr>
</tbody>
The code in javaScript is as follows:
self.EditDetalle = function () {
event.preventDefault();
debugger;
var sCode = $("#iCode").val()
window.location.href = "/Admin/ManagementRequest?iCode=" + sCode;
};