我正在使用datatable 1.10
。我已經創建了一個表格,但是我無法設法在其行上執行多個「shift select」。DataTables:移位多選不工作
根據該數據表文檔:
TableTools has four row selection modes of operation:
none - Default, where no user row selection options are available
single - A single row can be selected
multi - Multiple rows can be selected simply by clicking on the rows
os - Operating System like selection where you can use the shift and ctrl/cmd keys on your keyboard to add/remove rows from the selection.
所以我創造我的表如下:
$("#my-table-div").DataTable({
"retrieve": true,
"pagingType": "full_numbers",
"pageLength": 50,
"lengthMenu": [50, 100, 200],
"dom": '<lfi<t>p>',
"autoWidth": false,
"columns": columnsTable,
"tableTools": {
"sRowSelect": "os"
}
});
正如你所看到的,我使用的是"sRowSelect": "os"
,但它肯定是不作爲工作我渴望。我無法讓「班次選擇」工作。
關於我失蹤或做錯的任何想法?
如果您使用的是數據表1.10,則根本不應該使用TableTools;這是按鈕和選擇前的1.10擴展名。你應該使用Select擴展,記錄[這裏](https://datatables.net/extensions/select/) –