[英]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.