Buttons extension - getting data from datatable for a custom button?
Buttons extension - getting data from datatable for a custom button?
kerberonix
Posts: 7Questions: 5Answers: 0
I need to create a custom button which manipulates the table data before export, however I'm not sure how I can access the data from the datatable?
I can achieve this using the built in copy button like this:
"extend": "copy",
"text": "Export",
"customize": function (data) {
// do stuff with data here, like
console.log(data);
}
is it possible to access that copy object (or whatever its called) for a custom button?
"text": "Export",
"action": function(e, dt, node, config) {
// how to get data here?
},
"customize": function (data) {
// or here?
}
This discussion has been closed.
Answers
I figured it out.