Print Functionality
Print Functionality
Chapman
Posts: 5Questions: 0Answers: 0
http://www.datatables.net/release-datatables/extras/TableTools/bootstrap.html
The App I am developing using DataTables in various places is also using Bootstrap as its framework.
Js looks like this, all linked in correctly.
[code]
[/code]
Normal code is
[code]
$('#archprop').dataTable( {
"sDom": "<'row'<''l>T<'searchtbl'f>r>t<'row'<''i><'pgin'p>>",
}).rowGrouping({bExpandableGrouping: true
);
$("#archprop_info").appendTo(".btnplace-newpro");
$("#archprop_length").appendTo(".btn-group-newpro");
$("#archprop_filter").appendTo("#lcmpy");
[/code]
Removed the .appendTo jquery & above code then replaced it with the code for the Print functionality
[code]$(document).ready( function () {
$('#archprop').dataTable( {
"sDom": "<'row-fluid'<'span6'T><'span6'f>r>t<'row-fluid'<'span6'i><'span6'p>>",
"oTableTools": {
"aButtons": [
"copy",
"print",
{
"sExtends": "collection",
"sButtonText": 'Save ',
"aButtons": [ "csv", "xls", "pdf" ]
}
]
}
} );
} );
[/code]
Normally code generated will show up. Copy, Print and Save don't even seem to get generated into the HTML - I cannot find it anywhere on the page.
Anyone else have trouble getting this functionality to work?
The App I am developing using DataTables in various places is also using Bootstrap as its framework.
Js looks like this, all linked in correctly.
[code]
[/code]
Normal code is
[code]
$('#archprop').dataTable( {
"sDom": "<'row'<''l>T<'searchtbl'f>r>t<'row'<''i><'pgin'p>>",
}).rowGrouping({bExpandableGrouping: true
);
$("#archprop_info").appendTo(".btnplace-newpro");
$("#archprop_length").appendTo(".btn-group-newpro");
$("#archprop_filter").appendTo("#lcmpy");
[/code]
Removed the .appendTo jquery & above code then replaced it with the code for the Print functionality
[code]$(document).ready( function () {
$('#archprop').dataTable( {
"sDom": "<'row-fluid'<'span6'T><'span6'f>r>t<'row-fluid'<'span6'i><'span6'p>>",
"oTableTools": {
"aButtons": [
"copy",
"print",
{
"sExtends": "collection",
"sButtonText": 'Save ',
"aButtons": [ "csv", "xls", "pdf" ]
}
]
}
} );
} );
[/code]
Normally code generated will show up. Copy, Print and Save don't even seem to get generated into the HTML - I cannot find it anywhere on the page.
Anyone else have trouble getting this functionality to work?
This discussion has been closed.
Replies
Allan