Responsive Datatables expand icon overlying data in first column

Responsive Datatables expand icon overlying data in first column

JmpmdJmpmd Posts: 1Questions: 1Answers: 0

I have been trying to get the green expand icon in a responsive table to appear in its own column. The code I have been using (found in other answers here) works fine if the table HTML exists. However, my table is being popluated with jquery or Ajax, and the column definitions are being created on the fly.

Is there a way I can add the expand icon to its own column when using data fetching as described?

This is the code I am using:
** $('#example').DataTable( {
responsive: {
details: {
type: 'column'
}
},
columnDefs: [ {
className: 'dtr-control',
orderable: false,
targets: 0
} ],
order: [ 1, 'asc' ]
} );**

(I also tried adding the button to the right-most column: it appears but then does not work when clicked.)

Answers

Sign In or Register to comment.