JQuery DataTable TableTool not working in IE and Firefox

I am using JQuery DataTable TableTool in my MVC4 ASP.NET web application. Export to Excel and PDF works well with Chrome. But it does not work in IE and FireFox. My code is below

dom: 'T<"clear">lfrtip', tableTools: { "sSwfPath": "../media/swf/copy_csv_xls_pdf.swf", "aButtons": [ { "sExtends": "xls", "sFileName": "Orders.csv", "bFooter": false, "mColumns": "visible", "bHeader":false } ] }, 

Someone please help me

+6
source share
1 answer
 var oTable1 = $('#Ccctbl').dataTable({ "bPaginate": true, "bDeferRender": true, "bProcessing": true, "bJQueryUI": true, "sDom": '<"toolbar">frtip', "sAjaxSource": "/Setup/LoadCostCenterCategory/", "iDisplayLength": 15, "bDestroy": true, "fnPreDrawCallback": function (oSettings, json) { var id = $(this).attr('id'); $("#ToolTables_" + id + "_0").html("<i class='icon-copy bigger-120 blue'></i>") $("#ToolTables_" + id + "_1").html("<i class='icon-file-text green bigger-120'></i>") $("#ToolTables_" + id + "_0").attr("title", "Copy"); $("#ToolTables_" + id + "_1").attr("title", "Export To Excel"); }, "sDom": "<'row-fluid'<'span6'T><'span6'f>r>t<'row-fluid'<'span6'i><'span6'p>>", "oTableTools": { "sSwfPath": "//cdn.datatables.net/tabletools/2.2.2/swf/copy_csv_xls.swf", "aButtons": [ { 'sExtends': 'copy', "oSelectorOpts": { filter: 'applied', order: 'current' }, }, { 'sExtends': 'xls', "oSelectorOpts": { filter: 'applied', order: 'current' }, } ] }, "aoColumns": [ { "mData": "CODE", "sTitle": "Cost Center Category Code", "sWidth": "25%", "bSortable": false }, { "mData": "DESCRIPTION", "sTitle": "Description", "sWidth": "25%", "bSortable": false }, { "mData": "strsegcattype", "sTitle": "Segment", "sWidth": "25%", "bSortable": false }, { "mData": "strIsActive", "sTitle": "Active", "sWidth": "25%", "bSortable": false }, ] }); 
0
source

Source: https://habr.com/ru/post/975748/


All Articles