I am using the plugin "DataTables" and I'm wanting to add an image by line, that when the user clicks, call another url.
I followed the examples of www.datatables.net but is giving the below error:
DataTables warning (table id = 'myDataTable'): Requested unknown parameter '4' from the data source for row 0.
Records are shown on the screen
<h2>Index</h2>
<script type="text/javascript">
$(document).ready(function () {
var oTable = $('#myDataTable').dataTable({
"bServerSide": true,
"sAjaxSource": "AjaxHandler",
"bProcessing": true,
"sPaginationType": "full_numbers",
"aoColumns": [
{ "mDataProp": "ID", "bSortable": false },
{ "mDataProp": "Nome", "sTitle": "Identificação do produto" },
{ "mDataProp": "Address", "sTitle": "Descrição do produto" },
{ "mDataProp": "Town" },
{ "fnRender": function (o) {return '<a href=/Produto/Detalhar/' + o.aData[0] + '>' + 'More' + '</a>';}}
],
});
});
</script>
<table id="myDataTable" class="display">
<thead>
<tr>
<th>ID</th>
<th>Company name</th>
<th>Address</th>
<th>Town</th>
<th>Action</th>
</tr>
</thead>
<tbody>
</tbody>
</table>