Restart or uncheck all the selected options in datatable plugin "checkboxes"


I am using an extension for the jQuery DataTables library that serves to select multiple rows of the datatable and make operations with them. The extension is


jQuery DataTables Checkboxes


But I have a problem. I need that after performing an action on the selected records, all records are unchecked, but I can not do it.

I have tried to do nombreTabla.column(nColumnaDondeEstaElCheckbox) after doing the necessary operations but it does not respond. I have also tried to unmark all the input [type = checkbox] of the page but neither.

Any ideas about this "plugin-extension" of datatable?

asked by M. Giner 18.05.2018 в 07:11

1 answer


Use nombreTabla.columns().checkboxes.deselect(true) or nombreTabla.columns().checkboxes.deselectAll() .

I leave the link to the API

And here an example:

$(document).ready(function() {

  var dataSet = [
    ["Tiger Nixon", "System Architect", "Edinburgh", "5421", "2011/04/25", "$320,800"],
    ["Garrett Winters", "Accountant", "Tokyo", "8422", "2011/07/25", "$170,750"],
    ["Ashton Cox", "Junior Technical Author", "San Francisco", "1562", "2009/01/12", "$86,000"]

  var columnDefs = [{
    title: "Name"
  }, {
    title: "Position"
  }, {
    title: "Office"
  }, {
    title: "Extn."
  }, {
    title: "Start date"
  }, {
    title: "Salary"

  var myTable;

  myTable = $('#example').DataTable({
    "sPaginationType": "full_numbers",
    data: dataSet,
    'columnDefs': [
            'targets': 0,
            'checkboxes': {
               'selectRow': true
      'select': {
         'style': 'multi'
      'order': [[1, 'asc']],
    columns: columnDefs,
		dom: 'Bfrtip',        // Needs button container
          select: 'single',
          responsive: true,
          altEditor: true,     // Enable altEditor
          buttons: [{
            text: 'Add',
            name: 'add'        // do not change name
            extend: 'selected', // Bind to Selected row
            text: 'Edit',
            name: 'edit'        // do not change name
            extend: 'selected', // Bind to Selected row
            text: 'Delete',
            name: 'delete'      // do not change name


<script src=""></script>
<div class="container">
<link href="" rel="stylesheet"/>
<script src=""></script>
<link href="" rel="stylesheet"/>
<script src=""></script>

  <table cellpadding="0" cellspacing="0" border="0" class="dataTable table table-striped" id="example">

  <input id="desactivar" type="button" value="Desactivar"/>
answered by 18.05.2018 / 08:49