Filters + tabletools not working

Filters + tabletools not working

JoyJoy Posts: 24Questions: 0Answers: 0
edited August 2011 in General
I have :

var oTable1 = $('#example1').dataTable(
{"oLanguage": {"sSearch": "Search all columns:"}});
and

$("#example1 thead tr").clone().prependTo($("#example1 thead")).find("th").each(function(i) {this.innerHTML = fnCreateSelect(oTable1.fnGetColumnData(i));

$('select', this).change(function() {oTable1.fnFilter($(this).val(), i); }); } );


The above pice of code is for adding filters...
I need to add tabletools on top of that...But as soon as i add tabletools the filters disapear

Replies

  • allanallan Posts: 63,689Questions: 1Answers: 10,500 Site admin
    To add TableTools you need to use sDom, as shown here: http://datatables.net/extras/tabletools/ . If you add that in, does it work for you?

    Allan
  • JoyJoy Posts: 24Questions: 0Answers: 0
    No it does not.Its somehow interfering with the filters...
  • allanallan Posts: 63,689Questions: 1Answers: 10,500 Site admin
    Can you link to it for us?

    Allan
  • JoyJoy Posts: 24Questions: 0Answers: 0
    will it work if i dont use the SWF link and just the tabletools.js plugin

    $('#example').dataTable( {
    06. "sDom": 'T<"clear">lfrtip',
    07. "oTableTools": {
    08. "sSwfPath": "/swf/copy_cvs_xls_pdf.swf" ====> i don't have this file
    09. }
    10. } );
  • allanallan Posts: 63,689Questions: 1Answers: 10,500 Site admin
    The SWF (which is included in the TableTools and DataTables downloads) is used to provide local file saving options (for CSV etc) and copy to clipboard. If you don't want those buttons in TableTools, then you don't need the swf.

    Allan
This discussion has been closed.