我的应用拖放行的代码在下面,我想要rowReordering但这段代码导致双回发到服务器。每次调用服务器时,它都会再生成一个sAjaxSource请求。有什么方法可以在使用bServerSide和rowReordering时阻止双重回发。
$('#demoTable').dataTable({
"bServerSide": true,
"sPaginationType": "full_numbers",
"iDisplayLength": 4,
"sAjaxSource": "Home/AjaxHandler",
"bProcessing": true,
"aoColumns": [
{
"sTitle": "id",
"sName": "Id"
},
{ "sTitle": "Name", "sName": "Name" },
{
"sTitle": "Dob",
"sName": "Dob",
"sType": "date"
}
],
"fnRowCallback": function (nRow, aData, iDisplayIndex, iDisplayIndexFull) {
$(nRow).attr("id", aData[0]);
return nRow;
}
}).rowReordering({ sURL: "Home/UpdateOrder" });