[英]Are there callbacks on the Jquery Datatables Export buttons?
因此,我只实现了jquery数据表并添加了导出按钮。 我想知道在导出时是否有任何回调。 假设我有一个数据库中要显示在数据表中的项目列表,我想在导出它们后将它们从数据库中删除。
请任何帮助表示赞赏。
据我所知没有。 但是您可以创建自己的自定义按钮并为其定义操作 。 在该操作中,您可以调用导出功能,然后执行您要执行的所有操作。
new $.fn.dataTable.Buttons( table, {
buttons: [
{
text: 'Create CSV',
action: function ( e, dt, node, config ) {
// Call the default csvHtml5 action method to create the CSV file
$.fn.dataTable.ext.buttons.csvHtml5.action.call(this, e, dt, node, config);
// Do custom processing
alert('Other stuff');
}
}
]
} );
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.