Tôi đã tìm kiếm vài giờ qua, và tiếc là tôi không thể tìm thấy một ví dụ về cách điền dữ liệu có thể chỉnh sửa và cột liên kết xóa bằng .net và MVC.jquery datatables actionlink cách thêm
Đây là những gì tôi có cho đến nay, làm cách nào để thêm liên kết hành động? Tôi đang thiếu gì?
<script type="text/javascript">
$(document).ready(function() {
$('#myDataTable').dataTable({
bProcessing: true,
sAjaxSource: '@Url.Action("Index1", "Default1")'
});
});
</script>
<div id="container">
<div id="demo">
<table id="myDataTable">
<thead>
<tr>
<th>
RoleId
</th>
<th>
RoleName
</th>
<th>
UserId
</th>
<th>
UserName
</th>
</tr>
</thead>
<tbody>
</tbody>
</table>
</div>
</div>
Tôi muốn thêm điều này vào cột cuối cùng;
<td>
@Html.ActionLink("Edit", "Edit", new {id=item.PrimaryKey}) |
@Html.ActionLink("Details", "Details", new { id=item.PrimaryKey }) |
@Html.ActionLink("Delete", "Delete", new { id=item.PrimaryKey })
</td>
Nhưng không thể tìm ra cách thực hiện.
"fnRender" đã bị phản đối. Sử dụng "mRender" để thay thế. http://www.datatables.net/usage/columns – asunrey