-1
不工作我使用jQuery UI排序,使我的表網格排序。該代碼不顯示任何錯誤,但排序功能似乎沒有工作。通過這個我的意思是我的元素不重新排序。我從來沒有在mvc(views/razor)項目中使用這種方法。jQuery的排序有桌子和TR寬度aps.net MVC視圖
將不勝感激,如果任何人都可以給我一些指導或幫助。
謝謝。
script type="text/javascript">
$('td, th', '#MenuItem').each(function() {
var cell = $(this);
cell.width(cell.width());
});
$('#MenuItem tbody').sortable().disableSelection();
<table id = "MenuItem" class="promo full-width alternate-rows" style="text-align: center;">
<tr>
<th>Prode Code
</th>
<th>ProdeTemplate
</th>
<th>Description <!-- JACK EDIT -->
</th>
<th>Action</th>
</tr>
<tbody>
@foreach (var item in Model.IndexListitem)
{
<tr>
<td class="center-text">
@Html.DisplayFor(modelItem => item.ProductCode)
</td>
<td>
@Html.DisplayFor(modelItem => item.ProdeTemplate.Description)
</td>
<td>
@Html.DisplayFor(modelItem => item.Description)
</td>
<td class="center-text nowrap">
@Html.ActionLink(" ", "Edit", new { id = item.ProdeID }, new { title = "Edit", @class = "anchor-icon-no-text edit" })
@Html.ActionLink(" ", "Details", new { id = item.ProdeID }, new { title = "Details", @class = "anchor-icon-no-text details" })
@Html.ActionLink(" ", "Delete", new { id = item.ProdeID }, new { title = "Delete", @class = "anchor-icon-no-text delete" })
</td>
</tr>
}
</tbody>
</table>