Peacefull Peacefull - 7 months ago 31
Ajax Question

DataTables multi select rows issue with button in table

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 :


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 ->