I used the mentioned code for datatable 1.10+, but I get the row in the datatable cell instead of the link.
@Html.ActionLink("Edit", "Edit", new {id = "294"})
note that using and old version of mvc3 on solution Here is my javascript:
$(document).ready(function () { var tenantid = $('#tenantid').text(); $("#title").html("<h1>User List for TenantID: "+ tenantid + " </h1>"); var oTable = $('#list').DataTable({ "serverSide": true, "ajax": { "type": "POST", "url": '/User/DataHandler', "contentType": 'application/json; charset=utf-8', 'data': function (data) { data.ID = tenantid; return data = JSON.stringify(data); } }, "dom": 'lfrtiSp', "processing": true, "paging": true, "deferRender": true, "pageLength": 10, "lengthMenu": [5, 10, 25, 50, 75, 100], "columnDefs": [ { "targets": [-1], "data": "UserID", "render": function (data, type, row, meta) { return '@Html.ActionLink("Edit", "Edit", new {id = "replace"})'.replace("replace", row.UserID); } } ], "columns": [ { "data": "UserID", "orderable": true }, { "data": "UserGUID", "orderable": false }, { "data": "UserName", "orderable": true }, { "data": "UserEMAil", "orderable": true }, { "data": "UserIsDeleted", "orderable": true }, { "data": "Action", "orderable": false } ], "order": [0, "asc"] }); });