How to make PDF not show hidden column & iDisplay data (like 10 rows)

How to make PDF not show hidden column & iDisplay data (like 10 rows)

EaktadiurEaktadiur Posts: 2Questions: 0Answers: 0
edited February 2012 in TableTools
[code]
$(document).ready(function(){
var oTable = $('#dt_Vendors').dataTable({
"bJQueryUI": true,
"bPaginate": true,
"iDisplayLength": 25,
//"bAutoWidth": false,
"oLanguage": {
"sLengthMenu": 'Display '+
'10'+
'25'+
'50'+
'75'+
'100'+
'All'+
' records'
},
"sPaginationType": "full_numbers",
"sScrollX": "100%",
//"sDom":'T<"clear"><"H"lfr>t<"F"ip>',
// "sDom": 'lfr<"giveHeight"t>ip'
//"iDeferLoading": 20,
//"sDom": 'T<"clear"><"fg-toolbar ui-widget-header ui-corner-tl ui-corner-tr ui-helper-clearfix"lfr>t<"fg-toolbar ui-widget-header ui-corner-bl ui-corner-br ui-helper-clearfix"ip>',

"fnDrawCallback": function ( oSettings ) {
if ( oSettings.aiDisplay.length == 0 )
{
return;
}

var nTrs = $('#dt_Vendors tbody tr');
var iColspan = nTrs[0].getElementsByTagName('td').length;
var sLastGroup = "";
for ( var i=0 ; i

Replies

  • allanallan Posts: 63,489Questions: 1Answers: 10,470 Site admin
    mColumns is the option to tell TableTools what to include in the output: http://datatables.net/extras/tabletools/button_options#mColumns .

    There is currently no option to only export the visible rows - that would need to be an addition made to TableTools.

    Allan
  • rfitzwaterrfitzwater Posts: 57Questions: 5Answers: 1
    [quote]allan said: There is currently no option to only export the visible rows - that would need to be an addition made to TableTools.[/quote]

    Is adding this option something that is on the table? I have been forced to remove PDF export option because it garbles the output when columns are hidden.
This discussion has been closed.