我正在使用jquery datatable版本1.9.4我需要对每页的列标题进行排序。我尝试过fnstandingredraw功能。但我没有工作。
这是我的代码。
function ModalFormSuccess() {
var LocSearch = document.getElementById("LocSearch").value;
var table=$('#dacrudtable').dataTable({
"sDom": "<'row'<'col-sm-6'T><'col-sm-6'f>r>t<'row'<'col-sm-6'i><'col-sm-6'p>>",
"sAjaxSource": "ajax.php",
"fnServerParams": function(aoData) {
aoData.push({
"name": "cSearch",
"value": LocSearch
});
},
"bServerSide": true,
"bSearchable": false,
"bAutoWidth": false,
"bDestroy": true,
"bStateSave": true
'iDisplayLength': 500,
"aoColumns": [{ "mData":"status", "sClass":"center "},
{ "mData":"void_invoice", "sClass":"center "},
{ "mData":"created_date", "sClass":"center" },
{ "mData":"transfer_in_date", "sClass":"center" },
]
table.fnStandingRedraw();
}
我按照http://www.craiglotter.co.za/2012/05/28/how-to-refresh-a-datatable-without-losing-your-current-page-or-ordering/的程序进行了操作 我在这里缺少什么?有人可以帮忙吗?