Deactivate 'select' when first initializing the table - Multi Row Editing

Deactivate 'select' when first initializing the table - Multi Row Editing

CapamaniaCapamania Posts: 221Questions: 78Answers: 5
edited January 2017 in Select

Is it possible to deactivate the 'select' when initializing the table? And only activate the select after and if either one of 'selectRows', 'selectColumns', 'selectCells' is selected? And consequently deactivate the select if none of those buttons is selected?

I'm using Multi-Row Editing like this:

table = $('#my_table').DataTable( {
        dom: "Blfrtip",
        select: true,
        buttons: [
            {
                extend: 'collection',
                text: 'Select'
                buttons: [ {
                        extend: 'selectRows'
                    }, {
                        extend: 'selectColumns'
                    }, {    
                        extend: 'selectCells'
                    }, {    
                        extend: 'selectNone'
                    }, {
                        extend: 'edit',
                        editor: editor
                    }                   
                ]
            }                      
        ],   
        ajax: {
              url: "/accounts.php",
              type: "POST"
        serverSide: true,
        processing: true,
        columns: [
 ...                               
        ]                        
    } );   

As per default the select is always active with 'selectRows' selected. I tried ...

{
extend: 'selectRows',
enabled: false
}

... but did not do the trick. https://editor.datatables.net/examples/advanced/multiItem.html

This discussion has been closed.