Ho cercato le ultime ore, e sfortunatamente non riesco a trovare un esempio di come popolare un datatable con un'azione di modifica ed eliminare la colonna di collegamento usando .net e MVC.collegamento dati jQuerylink come aggiungere
Ecco cosa ho finora, come posso aggiungere un link di azione? Cosa mi manca?
<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>
Voglio aggiungere questo nell'ultima colonna;
<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>
Ma non riesco a capire come farlo.
"fnRender" è stato sconsigliato. Usa invece "mRender". http://www.datatables.net/usage/columns – asunrey