How to make print option with jquery data table plugin

I use the following codes to create a grid table

oTable = $('#search_table').dataTable({ "bJQueryUI": true, "sScrollY": "200px", "bPaginate": true, //"bAutoWidth": true, "sPaginationType": "full_numbers", "sDom": 'T<"clear">lfrtip', "oTableTools": { "aButtons": [{ "sExtends": "print", "sMessage": "Generated by DataTables" }] }, "aoColumns": [ null, null, null, null, null, null, null, { "bSortable": false }, { "bSortable": false }, null, ] }); 

Question: I need to print a table that is used in datatable plugins. is there any option to print with the data table plugin.

Thanks in advance...

+4
source share
1 answer

This add-on can help you: http://www.datatables.net/extras/tabletools/

TableTools is a plugin for the HTML enhancer DataTables, which adds a custom toolbar to the DataTable. Key Features:

  • Copy to clipboard
  • Save table data as CSV, XLS or PDF files.
  • View print for clean print
  • Row Selection Options
  • Easy to use predefined buttons
  • Easy button setup
  • Well defined API for advanced management ...
+11
source

Source: https://habr.com/ru/post/1369658/


All Articles