Toggle selected rows with a button
Toggle selected rows with a button
parismiguel
Posts: 7Questions: 3Answers: 0
Hi!
I'm trying to toggle only selected rows within a table using a button but, so far, all I've got is to filter only those in the current page within a collection of pages. Could you please help me what to do?
{
text: '<i class="fa fa-list" style="color:orange;"></i>',
action: function (e, dt, node, config) {
//This works only in current page
$('#tblUsers tbody tr').not('.selected').toggle();
//This doesn't work at all
tableUsers.rows({ selected: true }).data().draw();
},
className: 'vcaBtnTable'
},
This discussion has been closed.
Answers
OK... after hours of try and error, I've came with this solution that works ebautifully to my purposes.
Bear in mind that I had initialized my table as follows:
tableActions = $('#tblActions').DataTable({....});