I see from the examples that it is indeed possible to use Responsive with AJAX data, but in the example, the show/hide button is in the first cell. I use the following in my DataTable markup:
responsive: {
details: {
type: 'column'
}
},
I typically like to have the button in its own column, that only appears when the viewport triggers the Responsive extension by having an empty <th></th>
and an empty <td></td>
to contain the show/hide button.
However, my AJAX data does not contain an empty first column, and the <tbody>
structure is rendered by DataTables for the AJAX data. I have tried putting an empty column using columns.data
(didn't work), so I am starting to wonder if it is not possible to have a dedicated column for the Responsive show/hide buttons with AJAX data.
Is this possible?