Export selected row using checkbox in dataTables
Export selected row using checkbox in dataTables
`$('#example').dataTable( {
"sDom": 'T<"clear">lfrtip',
"oTableTools": {
"sRowSelect": "multi",
"aButtons": [
{
"sExtends": "csv",
"bSelectedOnly": true
}
]
},
"order": [[ 1, "desc" ]],
"lengthMenu": [[10, 25, 50, -1], [10, 25, 50, "All"]],
"columnDefs": [
{
"targets": 0,
render: function ( data, type, row ) {
return row[5]?'':'<input type="checkbox" value="'+row[4]+'">'
}
}
]
}); `
First issue - Export button is not showing on the page.
Second issue - How to implement this code correctly to export selected rows.
I am using normal DOM dataSource for dataTables.