DataTables multi select rows issue with button in table

559 views Asked by At

I'm trying to use the multi select rows function of DataTables, for now that make the job but when i add a "defaultContent": "<button class='btn_planning'>Show</button>" in my table there is a problem. That select the row when i click on button too :\

Live example :

live.datatables.net

1

There are 1 answers

0
davidkonrad On BEST ANSWER

The easiest would be to turn off the selector for the specific column holding a <button> :

select: {
  style: 'os',
  selector: 'td:not(:nth-child( COLUMN_INDEX ))' //dataTable column index + 1
}

see demo -> http://jsfiddle.net/f8ke0wwk/