Issue with using Responsive and a last column
Issue with using Responsive and a last column

Sorry for the barrage of questions today...
This time I'm trying to use Responsive to force hide a column (using className: none
), and add a last column with the button to show the child row with the details.
I've been trying to replicate https://datatables.net/extensions/responsive/examples/child-rows/right-column.html, but in my case the data is not in the HTML but added through the API.
It seems that if I don't add a column in the definition of the table (to contain the button), then nothing appears.
However if I do add it, and don't add a data
property to it, the table cannot fill...
If I do (with a fake pointer to data, or even a real one), the button doesn't do anything...
The issue is shown at http://live.datatables.net/karabota/1/edit (where I added a dummy column, with data: null
, just to try something...
This question has accepted answers - jump to:
Answers
Try adding
defaultContent
:http://live.datatables.net/sulafuva/1/edit
You can remove your
columnDefs
option as it is redundant.Kevin
Thanks, that fixed it.
Is there a way to name that column, and use that name for
responsive.details.target
z instead of a relative position?According to the
responsive.details.target
docs the value can be a string which is a jQuery selector. Something like this:http://live.datatables.net/jajinaba/1/edit
Kevin