I would like to disable a cancel button if the the record field "Status" is already recorded as cancelled. I already know how to disable a button but the problem is how would the jquery know that the record field "Status" is Cancelled. Here Are the Codes
@foreach (var rDetail in Model.Customers.ToList()) {
<tr>
<td>
@Html.DisplayFor(model => rDetail.DateEntry)
</td>
<td>
@Html.DisplayFor(model => rDetail.DateStart)
</td>
<td>
@Html.DisplayFor(model => rDetail.DateEnd)
</td>
<td>
@Html.DisplayFor(model => rDetail.Status.Name)
</td>
<td>
@Html.DisplayFor(model => rDetail.UserCode)
</td>
<td>
@Html.DisplayFor(model => rDetail.DateModified)
</td>
<td>
@Html.DisplayFor(model => rDetail.Remarks)
</td>
<td>
@Html.ActionLink("Details", "Details", "RoomReservation", new { id = rDetail.Id}, null) |
@using (Html.BeginForm("CancelReservation", "Rooms", new { roomId = Model.Id, reservationId = rDetail.Id, methodId = 0})) {
<input type="submit" value="Cancel" class ="cancelSubmit"/>
}
</td>
</tr>
Any help will be appreciated, thanks :)