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