我正在使用插件“DataTables”,我想要逐行添加图片,当用户单击时,调用另一个url。为插件添加按钮行JQuery DataTables
我跟着www.datatables.net的例子,但是给下面的错误:从数据源请求未知参数“4”的第0行:
数据表警告(表ID =“myDataTable”)。
记录显示在屏幕上
<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>
嗨,这段代码是工作这个网址http://www.flexgestor.com.br/CA,和dataTable版本是1.9.4 @Daniele Armanasco –