我試圖僅在數據表中根據一列啓用排序。但它不起作用。這是我嘗試如何啓用僅針對JQUERY數據表中的一列進行排序
var myTable = $("#tbl_main").dataTable({
"dom": "<'tableinfobar'i><'tablesearchbox'f><'tablestarfilter'><'tablebody't>S<'tablelength'l><'tablepaging'p>",
"ordering": false,
"columnDefs": [{"targets": [0, 6],"searchable": false}, {"targets":2, "type":"html-num","orderable":true}],
"lengthMenu": [
[10, 20, 50, 100, 500, -1],
[10, 20, 50, 100, 500, "All"]
]
}).show();
來這裏的路上我需要啓用僅僅次於列排序,並試圖在columnDefs
嘗試像' 「訂貨」:真 「columnDefs」:[{ aTargets:[ '_all'],bSortable:假}, {aTargets:[1],bSortable:真正} ] – RRR