Using jQuery Datatable plugin in salesforce datatable for downloading CSV or Pdf is not working

Using jQuery Datatable plugin in salesforce datatable for downloading CSV or Pdf is not working

Priya92Priya92 Posts: 2Questions: 1Answers: 0

I have used the following jquery plugin

var j$ = jQuery.noConflict(); j$('table.dataTable').dataTable({ sPaginationType: "full_numbers", sDom: '<"top"flp>rt<"bottom"i><"clear">', sButtons: ['copy','csv','excel','pdf','print'] });

And would like it to appear above the data table with all buttons** copy, csv,excel**

Please help us with the same

Answers

  • tangerinetangerine Posts: 3,365Questions: 39Answers: 395
    edited August 2017

    You need to include "B" (for Buttons) in your sDom definition.
    This assumes that you are correctly referencing Datatables' Buttons extension in your code.

  • Priya92Priya92 Posts: 2Questions: 1Answers: 0

    Thank you @tangerine . Do you mean to say that we have to use bButton instead of sButton ? Please advice

  • Dalex73Dalex73 Posts: 30Questions: 4Answers: 4

    No he meant, sDom: '<"top"Bflp>rt<"bottom"i><"clear">' for instance if you want the buttons on top of the table.

This discussion has been closed.