Quantcast
Channel: Recent Discussions — DataTables forums
Viewing all articles
Browse latest Browse all 82031

Buttons extension - getting data from datatable for a custom button?

$
0
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?
}

Viewing all articles
Browse latest Browse all 82031

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>