Hi,
I didn't see any topic with the inverted selection button, hence I took my time to write it.
The following works for my need and hopefully someone can add it to the stock code, because what's great can be greater ;).
I didn't see any topic with the inverted selection button, hence I took my time to write it.
The following works for my need and hopefully someone can add it to the stock code, because what's great can be greater ;).
var oTable = $('#example').dataTable({ "sDom": 'T<"clear">lfrtip', "oTableTools": { "sRowSelect": "multi", "aButtons": ["select_all", "select_none", { "sExtends": "text", "sButtonText": "Invert Selection", "fnClick": function(nButton, oConfig) { var selected = []; var unselected = []; var data = this.s.dt.aoData; for (var i = 0; i < data.length; i++) { if (data[i]._DTTT_selected) selected.push(data[i]); else unselected.push(data[i]); } this._fnRowDeselect(selected); this._fnRowSelect(unselected); } }] } });