Data Table with export option should export only s

2019-09-11 14:11发布

 Friends I'm using data table with export option but my requirement is . I have to download with search option . For example if I filter through position only those portion has to be downloaded . Where as now if I use the filter in table and give the export It is exporting whole value . I have attached The another image which I've to download only those values and not the whole value( Search filter enabled with position as Software Engineer) . So I will download only the data with position as software engineer.

enter image description here

1条回答
你好瞎i
2楼-- · 2019-09-11 14:31

Here is a generic example. It will show the PDF button and export only filtered rows :

$('#example').DataTable( {
  dom: 'Bfrtip',
  buttons: [{
    extend: 'pdfHtml5',
    exportOptions : {
      rows : {search:'applied'}
    }
  }]
});
查看更多
登录 后发表回答