I am using CSV button in data table using table tools plugin.with this code only-
var table=$('#srvc_data_table').dataTable( {
"data": dataSet,
"columns": table_headings,
"dom": 'T<"clear"><"H"lfr>t<"F"ip>',
"tableTools": {
"sSwfPath": "../swf/copy_csv_xls_pdf.swf",
},
});
button is declared in tableTools.js(tabletools plug-in file) as below ->
TableTools.BUTTONS = {
"csv": $.extend( {}, TableTools.buttonBase, {
"sAction": "flash_save",
"sButtonClass": "DTTT_button_csv",
"sButtonText": "CSV",
"sFieldBoundary": '"',
"sFieldSeperator": ",",
"fnClick": function( nButton, oConfig, flash ) {
this.fnSetText( flash, this.fnGetTableData(oConfig) );
}
} ),
CSV button is getting added on data table. But I dont want to place this button on table itself.I want this button on another toolbar. I want to detach the button from table or fire its click event from another button on different toolbar.Is it possible to fire fnClick event from another button.