[Solved] Getting only print button.
[Solved] Getting only print button.
Hi All,
I am looking a way to add only print button on the DataTable with only printer icon. I don't want to have "Print" text in button also.
I have following code and its not working.
[code]
$(document).ready(function(){
var oTable = $('#transaction').dataTable({
"bJQueryUI": true,
"sPaginationType": "full_numbers",
"iDisplayLength": 25,
"aLengthMenu": [[25, 50, 100, -1], [25, 50, 100, "All"]],
"aaSorting": [[0, 'desc']],
"bProcessing": true
});
var oTableTools = new TableTools( oTable, {
"aButtons": [
{
"type" : "print",
"sButtonText": " ",
"sToolTip": "Print"
}
]
});
$('#transaction_wrapper').before( oTableTools.dom.container );
});
[/code]
I am looking a way to add only print button on the DataTable with only printer icon. I don't want to have "Print" text in button also.
I have following code and its not working.
[code]
$(document).ready(function(){
var oTable = $('#transaction').dataTable({
"bJQueryUI": true,
"sPaginationType": "full_numbers",
"iDisplayLength": 25,
"aLengthMenu": [[25, 50, 100, -1], [25, 50, 100, "All"]],
"aaSorting": [[0, 'desc']],
"bProcessing": true
});
var oTableTools = new TableTools( oTable, {
"aButtons": [
{
"type" : "print",
"sButtonText": " ",
"sToolTip": "Print"
}
]
});
$('#transaction_wrapper').before( oTableTools.dom.container );
});
[/code]
This discussion has been closed.
Replies
[code]
"type" : "print",
[/code]
you want:
[code]
"sExtends" : "print",
[/code]
Then it should all work :-)
Allan
[code]
$(document).ready(function(){
var oTable = $('#transaction').dataTable({
"bJQueryUI": true,
"sPaginationType": "full_numbers",
"iDisplayLength": 25,
"aLengthMenu": [[25, 50, 100, -1], [25, 50, 100, "All"]],
"aaSorting": [[0, 'desc']],
"bProcessing": true
});
var oTableTools = new TableTools( oTable, {
"aButtons": [ {
"type": "print",
"sButtonText": " ",
"sToolTip": "Print"
}]
});
$('#transaction_wrapper').before( oTableTools.dom.container );
});
[/code]
I am getting error message "TableTools: Warning - unknown button type: undefined"
Allan