How to add div to datatable
How to add div to datatable
I would like to know whether it is possible to add a canvas to a datatable.
I have installed the datatable responsive plugin which, in case the column is too width, clicking a button will allow you to see extra information.
I would like to know whether I can add a canvas at the end (or at the begin ) of the hidden area in order to play an audio which correspond to the selected row. I wish to use a nice audio player called wavesurfer.js
To be able to do do that I need to learn the following:
*How to add a canvas at the end of the hidden area
*How to force the responsive table to not display the canvas in case the table has enough space
*The canvas has to fill the hidden div 100%
Picture of what I am trying to achieve (Each row is an audio file)
This question has an accepted answers - jump to answer
Answers
I don't see there being a problem doing that in the child row. Have a look at this example.
Allan
Thanks, sorry I didn't see that tutorial
Hi Allan,
The challenge I am facing is that I am running this with the responsive plugin enabled.
The format function is somehow conflicting with the responsive one.
I have two + buttons at the beginning of each row
Any thoughts on this?
This is correct - at the moment the only option would be to disable Responsive's own child row display.
Allan
My table has got 35 columns at the moment and I am using server side processing. What can I do to have two buttons in each row: one for the new rendered div and one for the responsive plugin?
Is it something I can fix somehow or it cannot be done?
I managed to find a workaround. Could you please check this piece of code
https://jsfiddle.net/28m3q10b/1/
If it works, then it looks fine to me.
Allan