DataTables copy selected rows
DataTables copy selected rows
yskapell
Posts: 47Questions: 14Answers: 3
Hello all,
I want to ask if I can copy a selected row (whole row) when I click it in a temp tables in a database or in a javascript array.
I tried to find any example but nothing,
Thank you,
This question has accepted answers - jump to:
Answers
Sorry but I don't understand what you are wanting to do.
Are you wanting to copy from Datatables or to Datatables?
If copying from Datatables how are you selecting the rows?
Some options to copy from Datatables is to use the
copyHtml5
button or userow().data()
to get the row data.You can use
row.add()
to insert rows into the Datatable that are copied from the database or Javascript array.For more specific help please provide more details of how you want this process to work.
Kevin
I want to copy from datatable to a temp array.
After I have select all the data I need to insert from that array to a database.
If I am not mistaken the copyHtml5 button copy something to keyboard. right?
Are you using the Select extension? If yes then see this example of getting the selected rows.
If not then yu might be able to use
selector-modifier
to select the rows with a class you assign usingrows().data()
.Yes, this copies to the clipboard.
Kevin
Hello.
The example of select extension is good for me.
Is any way to play in an editor with the specific example?
You can find some pre-built templates here for DOM, Ajax or Server side processing. Use the Download builder to get all the libraries you are intereted in testing.
Kevin