How to deselect all the rows of another table?

How to deselect all the rows of another table?

lauquinterolauquintero Posts: 2Questions: 1Answers: 0

i trying that deselect all rows of a table when unselect a row of principal table with events but when execute this code

table1.on('deselect', function (e, dt, type, indexes) {
var tableServ = $('#Tab-2').DataTable({ paging: false });
//tableServ.destroy();
tableServ.rows('.important').deselect();
}),

appear a error that i Cannot reinitialise DataTable, can help me pls

Answers

  • lauquinterolauquintero Posts: 2Questions: 1Answers: 0

    Solved...!!!! :)

    table1.on('deselect', function (e, dt, type, indexes) {
    var tableServ = $('#Tab-2').DataTable();
    tableServ.rows().deselect();
    }),

    I should not use {} in $ ('# Tab-2').Datatable ({});

This discussion has been closed.