I found the next code for generating multiple checkboxes inside datatable and its works great:
https://jsfiddle.net/snqw56dw/
var table = $('#example').DataTable({
'ajax': 'https://api.myjson.com/bins/1us28',
'columnDefs': [
{
'targets': 0,
'checkboxes': {
'selectRow': true
}
}
],
'select': {
'style': 'multi'
},
'order': [[1, 'asc']]
});
But when I try to change the code to work with static table data (changed that data will not come from Ajax) its stopped working..
Here is my code:
https://jsfiddle.net/snqw56dw/3158/
var table = $('#example').DataTable({
'columnDefs': [
{
'targets': 0,
'checkboxes': {
'selectRow': true
}
}
],
'select': {
'style': 'multi'
},
'order': [[1, 'asc']]
});
I would love to get your help and understand what I'm doing wrong there..
Thanks