Quantcast
Channel: Recent Discussions — DataTables forums
Viewing all articles
Browse latest Browse all 82109

Table tools wont work with fnRowCallback

$
0
0
I use fnRowCallback to calculate the serial number of the row. Just for display purpose.
"fnRowCallback" : function(nRow, aData, iDisplayIndex){
     						var oSettings = oAllLinksTable.fnSettings();
                            $("td:first", nRow).html(oSettings._iDisplayStart+iDisplayIndex +1);
                            return nRow;

Now when i export the file pdf/excel/csv or copy to clipboard the calculated row is not exported or present in clipboard.

How to proceed with this.. Any Idea !


   oAllLinksTable= $("#companies1").dataTable(
     				{
     					"sAjaxSource" : "/DTS/MultiskillServlet?screenCode=MasterData",
     					"aaSorting" : [],
     					"bDestroy" : true,
     					"bJQueryUI" : true,
     					"bStateSave": false,
     					"bRetrieve" : false,
     					"bProcessing" : true,
     					"iDisplayLength": 10,
     					"oLanguage": {
     			            "sSearch": "Search all columns:"
     			        },
     					"sPaginationType" : "full_numbers",
     					"sDom": 'T<"clear">lfrtip',
     					"fnRowCallback" : function(nRow, aData, iDisplayIndex){
     						var oSettings = oAllLinksTable.fnSettings();
                            $("td:first", nRow).html(oSettings._iDisplayStart+iDisplayIndex +1);
                            return nRow;
     		            },
     					"aoColumns" : 
     						[ 
     							  {"mData":null},  
     							  { "mData" : "stno",
     								 "mRender": function ( o,val,data ) {
     									if(data.last_payment != '-')
     										return '<a href="#"  onclick="javascript:details(\''+o+'\')" >'+o+'</a>';
     									else
     										return o;	
      						           	
     							  }},
     							  { "mData" : "name"}, 
     						 	  { "mData" : "grade"},
     						 	  { "mData" : "deptt"},
     						 	  { "mData" : "skill_accq"},
     						 	  { "mData" : "hrd_comp_date"},
     						 	  { "mData" : "util_end_date"},
     						 	  { "mData" : "last_payment"}
     						 	
     		    			],
     					 "oTableTools": {
     				            "aButtons": [
     											"copy",
     											"csv",
     											"xls",
     											"pdf",
     											"print"
     			   			            ]
     					        }
     				});
             

Viewing all articles
Browse latest Browse all 82109

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>