Closed Benjythebee closed 4 years ago
Your server-side script should produce unique values for the column containing checkboxes, for example 1
, 2
, 3
and you cannot use data': null,
for that column.
What would you have recommended? I ended up using :
$("#table-gen-key input[type=checkbox]:checked").each(function () {
}
Again I recommend to modify your server-side script post/dt_fingerprint.php
and return unique data as the first element of the array for each row, for example 1
, 2
, 3
. Then you can use the code you already have. Also remove 'data': null
.
I'm using serverside datatable with checkboxes in the first column. I have the following script based on https://jsfiddle.net/snqw56dw/
I'm using datatable dt-1.10.20 and the latest version of datatables checkboxes.
When I click "submit" the function returns [Object object] (not the id) and the row is not selected in the table. I have tried using "Object.values" but that gives " ["[","o","b","j","e","c","t"... While trying to solve this problem I also realised that clicking the checkbox doesn't select the row at all (the selected attribute doesn't show up), even though it should since
'selectRow': true,
Help...