我正在使用最新版本的datatable(1.10)。如果我使用" bServerSide":true默认排序不起作用 如果我发表评论" bServerSide":true,则顶部过滤器无法正常工作
var oTable = $('#list_order').dataTable( {
'destroy': true,
'bAutoWidth': false ,
"bProcessing": true,
"bServerSide": true,
"bFilter": false,
"bRetrieve": true,
"bSort": true,
"aaSorting": [[1, 'desc']],
'aoColumnDefs': [
{ 'bSortable': false, 'aTargets': [3,4,5] },
{ "bSearchable": false, "bVisible": false,"aTargets": [0] }
] ,
"sAjaxSource":"orders/server_list_orders",
"iDisplayStart ":20,
"iDisplayLength": 25,
"fnInitComplete": function() {
},
'fnServerData': function(sSource, aoData, fnCallback)
{
var formData_topSearch = $("#list_orders").serializeArray();
aoData = $.merge(aoData, formData_topSearch);
$.ajax
({
'dataType': 'json',
'type' : 'POST',
'url' : sSource,
'data' : aoData,
'success' : fnCallback
});
}
});
$('#list_orders').change(function(){
$('#list_order').dataTable().fnSortNeutral();
});
请帮我找一个解决方案