Examples of functioning csv copy pdf print?

Examples of functioning csv copy pdf print?

rendrakobinrendrakobin Posts: 8Questions: 0Answers: 0
edited August 2013 in TableTools
Hello!

First of all, thank you for this wonderful product!

I have a functioning table that utilizes ColReorder and ColVis. I would like to add the copy_csv_xls_pdf functionality. But I am not sure who to combine the javascript correctly. I have tried, but it doesn't seem to work.

Here is the code:
[code]






$(document).ready(function() {
/* Add the events etc before DataTables hides a column */
$("thead input").keyup( function () {
/* Filter on the column (the index) of this element */
oTable.fnFilter( this.value, oTable.oApi._fnVisibleToColumnIndex(
oTable.fnSettings(), $("thead input").index(this) ) );
} );

/*
* Support functions to provide a little bit of 'user friendlyness' to the textboxes
*/
$("thead input").each( function (i) {
this.initVal = this.value;
} );

$("thead input").focus( function () {
if ( this.className == "search_init" )
{
this.className = "";
this.value = "";
}
} );

$("thead input").blur( function (i) {
if ( this.value == "" )
{
this.className = "search_init";
this.value = this.initVal;
}
} );

oTable = $('#example').dataTable( {
"sDom": 'RC<"clear">lfrtip',
"aoColumnDefs": [
{ "bVisible": false, "aTargets": [ 2 ] }
],
"oLanguage": {
"sSearch": "Search all columns:"
},
"bSortCellsTop": true
} );
$('#example').dataTable( {
"sDom": 'T<"clear">lfrtip',
"oTableTools": {
"sSwfPath": "../_assets/copy_csv_xls_pdf.swf"
}
} );

} );


[/code]

Thank you in advance for any help! I am a newbie.

Replies

  • rendrakobinrendrakobin Posts: 8Questions: 0Answers: 0
    http://debug.datatables.net/ileriq

    ^here is the datatables debug code
  • rendrakobinrendrakobin Posts: 8Questions: 0Answers: 0
    Here is my test case where I posted the javascript. Sorry for not doing this immediately, but I just saw that this is suggested.

    http://live.datatables.net/oneguj/edit#javascript,html
This discussion has been closed.