开发者

How to make a print option with jquery data table plugin

开发者 https://www.devze.com 2023-04-01 06:54 出处:网络
I am using following codes for making table as grid oTable = $(\'#search_table\').dataTable({ \"bJQueryUI\": true,

I am using following codes for making table as grid

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 the table which is used in datatable plugins. whether any option for开发者_开发问答 print is there with data table plugin.

Thanks in advance...


This add–on might help you: http://www.datatables.net/extras/tabletools/

TableTools is a plug-in for the DataTables HTML table enhancer, which adds a highly customisable button toolbar to a DataTable. Key features include:

  • Copy to clipboard
  • Save table data as CSV, XLS or PDF files
  • Print view for clean printing
  • Row selection options
  • Easy use predefined buttons
  • Simple customisation of buttons
  • Well defined API for advanced control...
0

精彩评论

暂无评论...
验证码 换一张
取 消