TableTools copy/csv/excel/pdf buttons not working ...
TableTools copy/csv/excel/pdf buttons not working ...
I have a grails intranet application (so can't provide access to but could possibly supply stripped down project ? ..) which uses DataTables and TableTools .. I also use sbAdmin template (http://startbootstrap.com/template-overviews/sb-admin/) .. My datatables render fine with paging and searching .. The table tools render BUT only the print works .. I've seen the conversations regarding the location of the swf file and I can see it being loaded when I load a table with the tools attached but nothing seems to happen when I push a button .. I'm using DataTables 1.10.7 , TableTools 2.2.4 .. Is there anything I can debug - I can't see any activity when a button is pushed .. Thanks
Replies
Well I got a little further and discovered a possible bug maybe ? The scenario i'm working with creates a number of datatables which are initially hidden . One is selected from a menu and is displayed .. The TableTools buttons are displayed but not active .. I tracked the problem to a function getDOMObjectPosition in dataTables.tableTools.js ..
It seems that if the dataTable is initially created in a hidden state then the obj.width is undefined so the offsetWidth is used and this is 0 .. The result is that the buttons are displayed BUT aren't active due to the generated swf buttons having 0 height and width - changing these manually in firebug enables the corresponding buttton and enables the button .
Is this a bug ? Anyone suggest a workaround ? Thanks
If the table is hidden initially, then you need to call the
fnResizeButtons
method when it is made visible so the Flash movie can be made to fit the button area.Allan
Works ! Thanks