0
我在jQuery数据表中使用服务器端,但行不会添加到table.its来成为ajax,行也来到数据参数,但它不会添加到表。jQuery数据表中的服务器端响应
otable = $('#siteselectiontable').DataTable({
"serverSide": true,
"deferLoading": 0,
"processing": true,
"paging": true,
"columns": [{
"data":"RADIO"
},
{
"data":"SITE_DATA"
}
],
"ajax": {
success: function(data) {
if(typeof data['error']!="undefined"){
bootbox.alert({
closeButton: false,
message: "<div class='alert alert-danger' role='alert'>" +
"<strong>Timeout Error: </strong>Please refine your search" +
"</div>"
});
}
},
beforeSend: function() {
$("#siteselectionfooter").after(progress);
},
complete: function() {
$(".loading-mask").remove();
}
},
"searching": false,
"ordering": false,
"lengthChange": false,
"pageLength": 5,
"dom": '<"top"><"pull-right"f>t<"bottom center"p><"clear">',
"fnRowCallback": function(nRow, aData, iDisplayIndex, iDisplayIndexFull) {
$('td:eq(0)', nRow).css({
'text-align': 'center',
'vertical-align': 'middle'
});
}
});
和Ajax调用我使用下面的:
table.ajax.url(url).load();
具有u定义jQuery的数据表的页眉? – Se0ng11
你的数据表在哪里? –
我已经定义了头文件,行也出现了,但是有时候错误也出现了,我想以我的方式显示它,因为我定义了“成功”,但是在添加行后却没有添加到表格中。 – user2841408